mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-01-20 07:20:27 +01:00
PowerControl: Improve handling of ? settings
This commit is contained in:
parent
02d68af216
commit
d1546d1dc8
|
|
@ -105,7 +105,15 @@ namespace PowerControl.Menu
|
|||
|
||||
if (ApplyValue != null && SelectedOption != null)
|
||||
{
|
||||
ActiveOption = ApplyValue(SelectedOption);
|
||||
try
|
||||
{
|
||||
ActiveOption = ApplyValue(SelectedOption);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CommonHelpers.Log.TraceException("FinalizeSet", Name, e);
|
||||
Update();
|
||||
}
|
||||
|
||||
if (AfterApply != null && runAfterApply)
|
||||
AfterApply();
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ namespace PowerControl.Options
|
|||
|
||||
switch (selected.ToString())
|
||||
{
|
||||
case "?":
|
||||
case "Default":
|
||||
sd.MinCPUClock = 1400;
|
||||
sd.MaxCPUClock = 3500;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ namespace PowerControl.Options
|
|||
"Leave the game if it uses anti-cheat protection."))
|
||||
return null;
|
||||
|
||||
if (selected == "?")
|
||||
selected = "Default";
|
||||
|
||||
return CommonHelpers.Instance.WithGlobalMutex<string>(200, () =>
|
||||
{
|
||||
using (var sd = VangoghGPU.Open())
|
||||
|
|
@ -30,7 +33,7 @@ namespace PowerControl.Options
|
|||
if (sd is null)
|
||||
return null;
|
||||
|
||||
if (selected == "Default")
|
||||
if (selected == "Default" || selected == "?")
|
||||
{
|
||||
sd.HardMinGfxClock = 200;
|
||||
return selected;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ namespace PowerControl.Options
|
|||
"Leave the game if it uses anti-cheat protection."))
|
||||
return null;
|
||||
|
||||
// If undefined, select max
|
||||
if (selected == "?")
|
||||
selected = "15W";
|
||||
|
||||
uint mW = uint.Parse(selected.Replace("W", "")) * 1000;
|
||||
|
||||
if (VangoghGPU.IsSupported)
|
||||
|
|
|
|||
Loading…
Reference in a new issue