diff --git a/src/main/events/helpers/parse-launch-options.ts b/src/main/events/helpers/parse-launch-options.ts deleted file mode 100644 index e1b56259..00000000 --- a/src/main/events/helpers/parse-launch-options.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const parseLaunchOptions = (params: string | null): string[] => { - if (params == null || params == "") { - return []; - } - - const paramsSplit = params.split(" "); - - return paramsSplit; -}; diff --git a/src/main/events/library/open-game.ts b/src/main/events/library/open-game.ts index c2980f36..cf73c810 100644 --- a/src/main/events/library/open-game.ts +++ b/src/main/events/library/open-game.ts @@ -2,9 +2,7 @@ import { gameRepository } from "@main/repository"; import { registerEvent } from "../register-event"; import { shell } from "electron"; -import { spawn } from "child_process"; import { parseExecutablePath } from "../helpers/parse-executable-path"; -import { parseLaunchOptions } from "../helpers/parse-launch-options"; const openGame = async ( _event: Electron.IpcMainInvokeEvent, @@ -12,24 +10,15 @@ const openGame = async ( executablePath: string, launchOptions: string | null ) => { + // TODO: revisit this for launchOptions const parsedPath = parseExecutablePath(executablePath); - const parsedParams = parseLaunchOptions(launchOptions); await gameRepository.update( { id: gameId }, { executablePath: parsedPath, launchOptions } ); - if ( - process.platform === "linux" || - process.platform === "darwin" || - parsedParams.length === 0 - ) { - shell.openPath(parsedPath); - return; - } - - spawn(parsedPath, parsedParams, { shell: false, detached: true }); + shell.openPath(parsedPath); }; registerEvent("openGame", openGame); diff --git a/src/renderer/src/pages/game-details/modals/game-options-modal.tsx b/src/renderer/src/pages/game-details/modals/game-options-modal.tsx index 69b459d1..f299111a 100644 --- a/src/renderer/src/pages/game-details/modals/game-options-modal.tsx +++ b/src/renderer/src/pages/game-details/modals/game-options-modal.tsx @@ -141,8 +141,7 @@ export function GameOptionsModal({ const shouldShowWinePrefixConfiguration = window.electron.platform === "linux"; - const shouldShowLaunchOptionsConfiguration = - window.electron.platform === "win32"; + const shouldShowLaunchOptionsConfiguration = false; return ( <>