Adjustment of Windows Power Overlay is now optional

This commit is contained in:
Carsten Braun
2023-05-15 13:23:20 +02:00
parent a5541dfe10
commit 2a82e41894
14 changed files with 79 additions and 13 deletions

View File

@@ -28,6 +28,7 @@ namespace GHelper
labelPowerLimits.Text = Properties.Strings.PowerLimits;
labelInfo.Text = Properties.Strings.PPTExperimental;
checkApplyPower.Text = Properties.Strings.ApplyPowerLimits;
checkApplyWindowsPowerPlan.Text = Properties.Strings.ApplyWindowsPowerPlan;
labelFans.Text = Properties.Strings.FanCurves;
labelBoost.Text = Properties.Strings.CPUBoost;
@@ -377,6 +378,7 @@ namespace GHelper
int limit_total;
int limit_cpu;
bool apply = Program.config.getConfigPerf("auto_apply_power") == 1;
bool applyPP = Program.config.getConfig("auto_apply_power_plan") == 1;
if (changed)
{
@@ -401,6 +403,7 @@ namespace GHelper
trackTotal.Value = limit_total;
trackCPU.Value = limit_cpu;
checkApplyPower.Checked = apply;
checkApplyWindowsPowerPlan.Checked = applyPP;
labelTotal.Text = trackTotal.Value.ToString() + "W";
labelCPU.Text = trackCPU.Value.ToString() + "W";
@@ -689,6 +692,11 @@ namespace GHelper
}
}
private void checkApplyWindowsPowerPlan_CheckedChanged(object sender, EventArgs e)
{
CheckBox chk = (CheckBox)sender;
Program.config.setConfig("auto_apply_power_plan", chk.Checked ? 1 : 0);
}
}
}