diff options
| author | Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> | 2026-09-10 16:46:19 -0400 |
|---|---|---|
| committer | Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> | 2026-09-10 16:46:19 -0400 |
| commit | 817cdf3d5344e961df05f408354d0387c731f5ce (patch) | |
| tree | 7a3cf47e79e723df4da02fe59a79f94df3609360 /src | |
| parent | 9783834314956ea4765faadff7ae964151a7ff18 (diff) | |
| download | decky-lsfg-vk-817cdf3d5344e961df05f408354d0387c731f5ce.tar.gz decky-lsfg-vk-817cdf3d5344e961df05f408354d0387c731f5ce.zip | |
fix: derive now playing config from running app
Diffstat (limited to 'src')
| -rw-r--r-- | src/hooks/useGameConfiguration.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hooks/useGameConfiguration.ts b/src/hooks/useGameConfiguration.ts index 8d56a62..17eb867 100644 --- a/src/hooks/useGameConfiguration.ts +++ b/src/hooks/useGameConfiguration.ts @@ -116,6 +116,9 @@ export function useGameConfiguration() { }, [games, installedGames, runningGame]); const template = useMemo(() => ({ ...getDefaults(), ...globalConfig }), [globalConfig]); const config = games.find((game) => game.appid === selectedAppId)?.config || template; + const runningConfig = runningGame + ? games.find((game) => game.appid === runningGame.appid)?.config || template + : template; const ensureTargetWorkarounds = useCallback(async (target: GameTarget): Promise<boolean> => { if (!installedGames.some((game) => game.appid === target.appid)) return true; @@ -263,5 +266,5 @@ export function useGameConfiguration() { } }, [load, removeTargetWorkarounds, targets]); - return { config, games, targets, runningGame, selectedAppId, setSelectedAppId, save, enable, enableAll, repair, resetSelected, resetAll, reload: load }; + return { config, runningConfig, games, targets, runningGame, selectedAppId, setSelectedAppId, save, enable, enableAll, repair, resetSelected, resetAll, reload: load }; } |
