mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-04 22:07:40 +00:00
PowerControl: Base Profiles Implementation (#38)
Small refactor of menu with options Fix protection error on menuwithoptions Make profiles controller non static Dynamicall set and load options Use IsOSDForeground when retriveing current game name Better alt-tab functionality Get rid off thread.sleep Merged #38
This commit is contained in:
parent
ef94d24cfc
commit
3252e799cb
7 changed files with 252 additions and 12 deletions
|
|
@ -8,6 +8,7 @@ namespace PowerControl.Options
|
|||
public static Menu.MenuItemWithOptions Instance = new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "FPS Limit",
|
||||
PersistentKey = "FPSLimit",
|
||||
ApplyDelay = 500,
|
||||
ResetValue = () => { return "Off"; },
|
||||
OptionsValues = delegate ()
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ namespace PowerControl.Options
|
|||
public static Menu.MenuItemWithOptions Instance = new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "Refresh Rate",
|
||||
PersistentKey = "RefreshRate",
|
||||
ApplyDelay = 1000,
|
||||
ResetValue = () => { return DisplayResolutionController.GetRefreshRates().Max().ToString(); },
|
||||
OptionsValues = delegate ()
|
||||
|
|
@ -24,10 +25,14 @@ namespace PowerControl.Options
|
|||
ApplyValue = (selected) =>
|
||||
{
|
||||
DisplayResolutionController.SetRefreshRate(int.Parse(selected));
|
||||
|
||||
return DisplayResolutionController.GetRefreshRate().ToString();
|
||||
},
|
||||
AfterApply = () =>
|
||||
{
|
||||
// force reset and refresh of FPS limit
|
||||
FPSLimit.Instance.Reset();
|
||||
FPSLimit.Instance.Update();
|
||||
return DisplayResolutionController.GetRefreshRate().ToString();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue