Skip to content

Commit

Permalink
Change BIOS version source to registry.
Browse files Browse the repository at this point in the history
  • Loading branch information
BartoszCichecki committed May 15, 2024
1 parent 98aff46 commit 9e91ab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LenovoLegionToolkit.Lib/Utils/Compatibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static async Task<MachineInformation> GetMachineInformationAsync()
return _machineInformation.Value;

var (vendor, machineType, model, serialNumber) = await GetModelDataAsync().ConfigureAwait(false);
var (biosVersion, biosVersionRaw) = await GetBIOSVersionAsync().ConfigureAwait(false);
var (biosVersion, biosVersionRaw) = GetBIOSVersion();
var supportedPowerModes = (await GetSupportedPowerModesAsync().ConfigureAwait(false)).ToArray();
var smartFanVersion = await GetSmartFanVersionAsync().ConfigureAwait(false);
var legionZoneVersion = await GetLegionZoneVersionAsync().ConfigureAwait(false);
Expand Down Expand Up @@ -174,7 +174,7 @@ public static async Task<MachineInformation> GetMachineInformationAsync()

private static (BiosVersion?, string?) GetBIOSVersion()
{
var result = Registry.GetValue("HKEY_LOCAL_MACHINE", "HARDWARE\\DESCRIPTION\\System\\BIOS", "BIOSVersion", string.Empty);
var result = Registry.GetValue("HKEY_LOCAL_MACHINE", "HARDWARE\\DESCRIPTION\\System\\BIOS", "BIOSVersion", string.Empty).Trim();

var prefixRegex = BiosPrefixRegex();
var versionRegex = BiosVersionRegex();
Expand Down

0 comments on commit 9e91ab9

Please sign in to comment.