mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-07 23:33:52 +00:00
CommonHelpers: Move RTSS to OSDHelpers
This commit is contained in:
parent
8f31e4ed00
commit
e1a4073a7c
6 changed files with 134 additions and 134 deletions
|
|
@ -116,7 +116,7 @@ namespace PowerControl
|
|||
|
||||
GlobalHotKey.RegisterHotKey(Settings.Default.MenuUpKey, () =>
|
||||
{
|
||||
if (!RTSS.IsOSDForeground())
|
||||
if (!OSDHelpers.IsOSDForeground())
|
||||
return;
|
||||
rootMenu.Next(-1);
|
||||
setDismissTimer();
|
||||
|
|
@ -125,7 +125,7 @@ namespace PowerControl
|
|||
|
||||
GlobalHotKey.RegisterHotKey(Settings.Default.MenuDownKey, () =>
|
||||
{
|
||||
if (!RTSS.IsOSDForeground())
|
||||
if (!OSDHelpers.IsOSDForeground())
|
||||
return;
|
||||
rootMenu.Next(1);
|
||||
setDismissTimer();
|
||||
|
|
@ -134,7 +134,7 @@ namespace PowerControl
|
|||
|
||||
GlobalHotKey.RegisterHotKey(Settings.Default.MenuLeftKey, () =>
|
||||
{
|
||||
if (!RTSS.IsOSDForeground())
|
||||
if (!OSDHelpers.IsOSDForeground())
|
||||
return;
|
||||
rootMenu.SelectNext(-1);
|
||||
setDismissTimer();
|
||||
|
|
@ -143,7 +143,7 @@ namespace PowerControl
|
|||
|
||||
GlobalHotKey.RegisterHotKey(Settings.Default.MenuRightKey, () =>
|
||||
{
|
||||
if (!RTSS.IsOSDForeground())
|
||||
if (!OSDHelpers.IsOSDForeground())
|
||||
return;
|
||||
rootMenu.SelectNext(1);
|
||||
setDismissTimer();
|
||||
|
|
@ -154,7 +154,7 @@ namespace PowerControl
|
|||
{
|
||||
isOSDToggled = !rootMenu.Visible;
|
||||
|
||||
if (!RTSS.IsOSDForeground())
|
||||
if (!OSDHelpers.IsOSDForeground())
|
||||
return;
|
||||
|
||||
if (isOSDToggled)
|
||||
|
|
@ -285,7 +285,7 @@ namespace PowerControl
|
|||
return;
|
||||
}
|
||||
|
||||
if (!neptuneDeviceState.buttons5.HasFlag(SDCButton5.BTN_QUICK_ACCESS) || !RTSS.IsOSDForeground())
|
||||
if (!neptuneDeviceState.buttons5.HasFlag(SDCButton5.BTN_QUICK_ACCESS) || !OSDHelpers.IsOSDForeground())
|
||||
{
|
||||
// schedule next repeat far in the future
|
||||
dismissNeptuneInput();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace PowerControl.Options
|
|||
ResetValue = () => { return "Yes"; },
|
||||
CurrentValue = delegate ()
|
||||
{
|
||||
if (!RTSS.IsOSDForeground(out var processId))
|
||||
if (!OSDHelpers.IsOSDForeground(out var processId))
|
||||
return null;
|
||||
if (!ProcessorCores.HasSMTThreads())
|
||||
return null;
|
||||
|
|
@ -23,7 +23,7 @@ namespace PowerControl.Options
|
|||
},
|
||||
ApplyValue = (selected) =>
|
||||
{
|
||||
if (!RTSS.IsOSDForeground(out var processId))
|
||||
if (!OSDHelpers.IsOSDForeground(out var processId))
|
||||
return null;
|
||||
if (!ProcessorCores.HasSMTThreads())
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ namespace PowerControl
|
|||
return;
|
||||
}
|
||||
|
||||
RTSS.Applications.Instance.Refresh();
|
||||
OSDHelpers.Applications.Instance.Refresh();
|
||||
|
||||
if (RTSS.Applications.Instance.FindForeground(out var processId, out var processName))
|
||||
if (OSDHelpers.Applications.Instance.FindForeground(out var processId, out var processName))
|
||||
{
|
||||
if (!BringUpProcess(processId))
|
||||
AddProcess(processId, processName);
|
||||
|
|
@ -81,7 +81,7 @@ namespace PowerControl
|
|||
|
||||
foreach (var process in watchedProcesses)
|
||||
{
|
||||
if (RTSS.Applications.Instance.IsRunning(process.Key))
|
||||
if (OSDHelpers.Applications.Instance.IsRunning(process.Key))
|
||||
continue;
|
||||
RemoveProcess(process.Key);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue