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/hooks/useGameConfiguration.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/hooks/useGameConfiguration.ts') diff --git a/src/hooks/useGameConfiguration.ts b/src/hooks/useGameConfiguration.ts index a3976a0..b2867b3 100644 --- a/src/hooks/useGameConfiguration.ts +++ b/src/hooks/useGameConfiguration.ts @@ -3,13 +3,16 @@ import { useQuickAccessVisible } from "@decky/api"; import { Router } from "@decky/ui"; import { getGameConfigs, getInstalledGames, getWorkaroundState, removeWorkaroundState, resetGameConfig, resetAllGameConfigs, setWorkaroundState, updateGameConfig, type GameConfigEntry, type GlobalConfig, type InstalledGame, type WorkaroundState } from "../api/lsfgApi"; import { ConfigurationData, getDefaults } from "../config/configSchema"; -import { getDefaultWrapperPath, installWrapperIntegration, removeWrapperIntegration } from "../utils/steamLaunchOptions"; +import { getDefaultWrapperPath, installWrapperIntegration, normalizeShortcutTarget, removeWrapperIntegration } from "../utils/steamLaunchOptions"; import { showErrorToast } from "../utils/toastUtils"; export interface GameTarget extends InstalledGame { configured: boolean; } -function shortcutTransport(executable: unknown): InstalledGame["transport"] { - const target = typeof executable === "string" ? executable.trim() : ""; +function shortcutTransport(executable: unknown, startDir: unknown): InstalledGame["transport"] { + const target = normalizeShortcutTarget( + typeof executable === "string" ? executable : undefined, + typeof startDir === "string" ? startDir : undefined, + ); return target === "/usr/bin/flatpak" || target === '"~/.lsfg" "/usr/bin/flatpak"' || target === "~/.lsfg /usr/bin/flatpak" @@ -29,11 +32,12 @@ async function getSteamShortcuts(): Promise { const name = shortcut?.data?.strAppName; if (!Number.isInteger(appid) || appid === 0 || typeof name !== "string" || !name) return []; const executable = shortcut?.data?.strShortcutExe ?? shortcut?.data?.strExe ?? shortcut?.data?.exe; + const startDir = shortcut?.data?.strShortcutStartDir ?? shortcut?.data?.strStartDir ?? shortcut?.data?.startDir; return [{ appid: String(appid >>> 0), name, nonSteam: true, - transport: shortcutTransport(executable), + transport: shortcutTransport(executable, startDir), }]; }); } catch { -- cgit v1.2.3