mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-06 14:53:48 +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
|
|
@ -33,6 +33,8 @@ namespace PowerControl
|
|||
DateTime? neptuneDeviceNextKey;
|
||||
System.Windows.Forms.Timer neptuneTimer;
|
||||
|
||||
ProfilesController profilesController;
|
||||
|
||||
SharedData<PowerControlSetting> sharedData = SharedData<PowerControlSetting>.CreateNew();
|
||||
|
||||
static Controller()
|
||||
|
|
@ -110,6 +112,9 @@ namespace PowerControl
|
|||
osdTimer.Interval = 250;
|
||||
osdTimer.Enabled = true;
|
||||
|
||||
profilesController = new ProfilesController();
|
||||
profilesController.Initialize();
|
||||
|
||||
GlobalHotKey.RegisterHotKey(Settings.Default.MenuUpKey, () =>
|
||||
{
|
||||
if (!RTSS.IsOSDForeground())
|
||||
|
|
@ -409,6 +414,9 @@ namespace PowerControl
|
|||
System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(
|
||||
new Action(() =>
|
||||
{
|
||||
Options.RefreshRate.Instance?.Reset();
|
||||
Options.FPSLimit.Instance?.Reset();
|
||||
|
||||
rootMenu.Update();
|
||||
})
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue