summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-10 14:59:56 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-10 14:59:56 -0400
commitbe1feeee76cf4956bc5456e4b2740930750fbedf (patch)
tree32f08835271fd92f99d6be699bf7cbde81a2060c /src/utils
parent1e97e741ae89270801526234e3caaf5c7aacdca7 (diff)
downloaddecky-lsfg-vk-be1feeee76cf4956bc5456e4b2740930750fbedf.tar.gz
decky-lsfg-vk-be1feeee76cf4956bc5456e4b2740930750fbedf.zip
fix: recognize split Steam Flatpak targets
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/steamLaunchOptions.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/utils/steamLaunchOptions.ts b/src/utils/steamLaunchOptions.ts
index bcd69d0..9f88a9f 100644
--- a/src/utils/steamLaunchOptions.ts
+++ b/src/utils/steamLaunchOptions.ts
@@ -57,12 +57,20 @@ function timer() {
};
}
+export function normalizeShortcutTarget(executable?: string | null, startDir?: string | null): string {
+ const target = typeof executable === "string" ? executable.trim() : "";
+ const normalizedStartDir = typeof startDir === "string" ? startDir.trim().replace(/\/+$/, "") : "";
+ return target === "flatpak" && normalizedStartDir === "/usr/bin"
+ ? DIRECT_FLATPAK_EXECUTABLE
+ : target;
+}
+
function snapshot(appId: number, nonSteam: boolean, details: SteamAppDetails): SteamLaunchOptionsSnapshot {
return {
appId,
nonSteam,
options: nonSteam ? details.strShortcutLaunchOptions || "" : details.strLaunchOptions || "",
- target: nonSteam ? details.strShortcutExe || "" : "",
+ target: nonSteam ? normalizeShortcutTarget(details.strShortcutExe, details.strShortcutStartDir) : "",
details,
};
}