diff --git a/DockerForm/Form1.cs b/DockerForm/Form1.cs index e1e2949..7373a71 100644 --- a/DockerForm/Form1.cs +++ b/DockerForm/Form1.cs @@ -154,7 +154,7 @@ private static void ApplyPowerProfiles() private static void SetPowerProfile(PowerProfile profile) { // skip if unsupported platform - if (MCHBAR == null) + if (MCHBAR == null || !MCHBAR.Contains("0x")) return; // skip check on empty profile @@ -826,10 +826,13 @@ public Form1() while (!proc.StandardOutput.EndOfStream) { string line = proc.StandardOutput.ReadLine(); + + if (!line.Contains("0x")) + continue; + MCHBAR = line.GetLast(10); MCHBAR = MCHBAR.Substring(0, 6) + "59"; break; - // do something with line } /* string ProcessorID = GetProcessorID();