Added possible fix for bios unsetting ppts after wake up

This commit is contained in:
seerge
2023-03-09 16:03:39 +01:00
parent c5a32cc9d5
commit 306697f026
3 changed files with 79 additions and 10 deletions

View File

@@ -702,6 +702,22 @@ namespace GHelper
}
public void AutoFansAndPower()
{
if (Program.config.getConfigPerf("auto_apply") == 1)
{
Program.wmi.SetFanCurve(0, Program.config.getFanConfig(0));
Program.wmi.SetFanCurve(1, Program.config.getFanConfig(1));
}
if (Program.config.getConfigPerf("auto_apply_power") == 1)
{
SetPower();
}
}
public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced, bool notify = false)
{
@@ -732,16 +748,7 @@ namespace GHelper
Program.wmi.DeviceSet(ASUSWmi.PerformanceMode, PerformanceMode);
if (Program.config.getConfigPerf("auto_apply") == 1)
{
Program.wmi.SetFanCurve(0, Program.config.getFanConfig(0));
Program.wmi.SetFanCurve(1, Program.config.getFanConfig(1));
}
if (Program.config.getConfigPerf("auto_apply_power") == 1)
{
SetPower();
}
AutoFansAndPower();
if (fans != null && fans.Text != "")
{
@@ -749,6 +756,8 @@ namespace GHelper
fans.InitPower();
}
Debug.WriteLine("Perf:" + PerformanceMode);
if (notify && (oldMode != PerformanceMode))
{
try