summaryrefslogtreecommitdiff
path: root/src/hooks
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-08 16:56:57 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-08 16:56:57 -0400
commitbec26fe025c97c00d398e7a4fb571195706b9e76 (patch)
treeabec710e369d4c1cf3a0d97501a6fe9667a63d93 /src/hooks
parent8352ee74e8a437c1f4a4dadb75d63049f45b164b (diff)
downloaddecky-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.ts5
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);