diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2026-09-08 16:56:57 -0400 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2026-09-08 16:56:57 -0400 |
| commit | bec26fe025c97c00d398e7a4fb571195706b9e76 (patch) | |
| tree | abec710e369d4c1cf3a0d97501a6fe9667a63d93 /src/hooks | |
| parent | 8352ee74e8a437c1f4a4dadb75d63049f45b164b (diff) | |
| download | decky-lsfg-vk-bec26fe025c97c00d398e7a4fb571195706b9e76.tar.gz decky-lsfg-vk-bec26fe025c97c00d398e7a4fb571195706b9e76.zip | |
feat: more launch arg janitoring
Diffstat (limited to 'src/hooks')
| -rw-r--r-- | src/hooks/useGameConfiguration.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hooks/useGameConfiguration.ts b/src/hooks/useGameConfiguration.ts index 7a572f9..46607cb 100644 --- a/src/hooks/useGameConfiguration.ts +++ b/src/hooks/useGameConfiguration.ts @@ -106,12 +106,13 @@ export function useGameConfiguration() { } }, [installedGames]); - const save = useCallback(async (next: ConfigurationData) => { + const save = useCallback(async (next: ConfigurationData, cleanupLaunchOptions = false) => { const selectedTarget = targets.find((target) => target.appid === selectedAppId); if (!selectedTarget?.name) return; + if (cleanupLaunchOptions && !(await cleanupTargetLaunchOptions(selectedTarget))) return; const result = await updateGameConfig(selectedAppId, selectedTarget.name, next); if (result.success) await load(); - }, [load, selectedAppId, targets]); + }, [cleanupTargetLaunchOptions, load, selectedAppId, targets]); const enable = useCallback(async (appid: string) => { const target = targets.find((item) => item.appid === appid); |
