From be1feeee76cf4956bc5456e4b2740930750fbedf Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 10 Sep 2026 14:59:56 -0400 Subject: fix: recognize split Steam Flatpak targets --- src/utils/steamLaunchOptions.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/utils/steamLaunchOptions.ts') 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, }; } -- cgit v1.2.3