mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-06 14:53:48 +00:00
Fix using Playnite to launch Steam game where on exit Desktop was activated
This commit is contained in:
parent
381f940d8b
commit
c2f37dedd9
6 changed files with 56 additions and 23 deletions
|
|
@ -9,8 +9,6 @@ namespace SteamController.Managers
|
|||
"Playnite.FullscreenApp"
|
||||
};
|
||||
|
||||
private bool activated;
|
||||
|
||||
private Process? FindActivationProcess()
|
||||
{
|
||||
foreach (var processName in ActivationProcessNames)
|
||||
|
|
@ -25,23 +23,7 @@ namespace SteamController.Managers
|
|||
|
||||
public override void Tick(Context context)
|
||||
{
|
||||
// React to state change
|
||||
if (FindActivationProcess() is not null)
|
||||
{
|
||||
if (!activated)
|
||||
{
|
||||
activated = true;
|
||||
context.SelectController();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (activated)
|
||||
{
|
||||
activated = false;
|
||||
context.BackToDefault();
|
||||
}
|
||||
}
|
||||
context.GameProcessRunning = FindActivationProcess() is not null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue