mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-05 06:15:26 +00:00
PowerControl: Expose all settings and apply them in order
Since some settings impact others, the application will apply them in a correct order with a fixed delay. This additionally exposes all settings, just some of them are not persisted on create, only on change.
This commit is contained in:
parent
12de2267bf
commit
2ff2864f23
11 changed files with 115 additions and 32 deletions
|
|
@ -7,6 +7,8 @@ namespace PowerControl.Options
|
|||
public static Menu.MenuItemWithOptions Instance = new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "CPU",
|
||||
PersistentKey = "CPUFrequency",
|
||||
PersistOnCreate = false,
|
||||
Options = { "Default", "Power-Save", "Balanced", "Max" },
|
||||
ApplyDelay = 1000,
|
||||
ActiveOption = "?",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ namespace PowerControl.Options
|
|||
public static Menu.MenuItemWithOptions Instance = new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "FAN",
|
||||
PersistentKey = "FANMode",
|
||||
PersistOnCreate = false,
|
||||
ApplyDelay = 500,
|
||||
OptionsValues = delegate ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ namespace PowerControl.Options
|
|||
public static Menu.MenuItemWithOptions Instance = new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "GPU",
|
||||
PersistentKey = "GPUFrequency",
|
||||
PersistOnCreate = false,
|
||||
Options = { "Default", "400MHz", "800MHz", "1200MHz", "1600MHz" },
|
||||
ApplyDelay = 1000,
|
||||
Visible = VangoghGPU.IsSupported,
|
||||
|
|
|
|||
|
|
@ -31,14 +31,22 @@ namespace PowerControl.Options
|
|||
// Since the RadeonSoftware will try to revert values
|
||||
RadeonSoftware.Kill();
|
||||
|
||||
if (!GPUScaling.Enabled)
|
||||
return "Off";
|
||||
return GPUScaling.Mode.ToString();
|
||||
},
|
||||
Impacts =
|
||||
{
|
||||
Resolution.Instance,
|
||||
RefreshRate.Instance,
|
||||
FPSLimit.Instance
|
||||
},
|
||||
AfterApply = () =>
|
||||
{
|
||||
Resolution.Instance.Update();
|
||||
RefreshRate.Instance.Update();
|
||||
FPSLimit.Instance.Reset();
|
||||
FPSLimit.Instance.Update();
|
||||
|
||||
if (!GPUScaling.Enabled)
|
||||
return "Off";
|
||||
return GPUScaling.Mode.ToString();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ namespace PowerControl.Options
|
|||
public static Menu.MenuItemWithOptions ModeInstance = new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "OSD Mode",
|
||||
PersistentKey = "PerformanceOverlayMode",
|
||||
ApplyDelay = 500,
|
||||
OptionsValues = delegate ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ namespace PowerControl.Options
|
|||
|
||||
return DisplayResolutionController.GetRefreshRate().ToString();
|
||||
},
|
||||
Impacts =
|
||||
{
|
||||
FPSLimit.Instance
|
||||
},
|
||||
AfterApply = () =>
|
||||
{
|
||||
// force reset and refresh of FPS limit
|
||||
|
|
|
|||
|
|
@ -33,12 +33,20 @@ namespace PowerControl.Options
|
|||
{
|
||||
var selectedResolution = new DisplayResolutionController.DisplayResolution(selected);
|
||||
DisplayResolutionController.SetResolution(selectedResolution);
|
||||
return DisplayResolutionController.GetResolution().ToString();
|
||||
},
|
||||
Impacts =
|
||||
{
|
||||
RefreshRate.Instance,
|
||||
FPSLimit.Instance
|
||||
},
|
||||
AfterApply = () =>
|
||||
{
|
||||
// force refresh Refresh Rate
|
||||
RefreshRate.Instance.Update();
|
||||
// force reset and refresh of FPS limit
|
||||
FPSLimit.Instance.Reset();
|
||||
FPSLimit.Instance.Update();
|
||||
return DisplayResolutionController.GetResolution().ToString();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ namespace PowerControl.Options
|
|||
public static Menu.MenuItemWithOptions Instance = new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "Controller",
|
||||
PersistentKey = "SteamController",
|
||||
PersistOnCreate = false,
|
||||
ApplyDelay = 500,
|
||||
OptionsValues = delegate ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ namespace PowerControl.Options
|
|||
public static Menu.MenuItemWithOptions Instance = new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "TDP",
|
||||
PersistentKey = "TDP",
|
||||
PersistOnCreate = false,
|
||||
Options = { "3W", "4W", "5W", "6W", "7W", "8W", "10W", "12W", "15W" },
|
||||
ApplyDelay = 1000,
|
||||
ResetValue = () => { return "15W"; },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue