Skip to content

Commit 16b50fc

Browse files
committed
feat: remove launch options temporarily
1 parent 720a7aa commit 16b50fc

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

src/main/events/helpers/parse-launch-options.ts

-9
This file was deleted.

src/main/events/library/open-game.ts

+2-13
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,23 @@ import { gameRepository } from "@main/repository";
22

33
import { registerEvent } from "../register-event";
44
import { shell } from "electron";
5-
import { spawn } from "child_process";
65
import { parseExecutablePath } from "../helpers/parse-executable-path";
7-
import { parseLaunchOptions } from "../helpers/parse-launch-options";
86

97
const openGame = async (
108
_event: Electron.IpcMainInvokeEvent,
119
gameId: number,
1210
executablePath: string,
1311
launchOptions: string | null
1412
) => {
13+
// TODO: revisit this for launchOptions
1514
const parsedPath = parseExecutablePath(executablePath);
16-
const parsedParams = parseLaunchOptions(launchOptions);
1715

1816
await gameRepository.update(
1917
{ id: gameId },
2018
{ executablePath: parsedPath, launchOptions }
2119
);
2220

23-
if (
24-
process.platform === "linux" ||
25-
process.platform === "darwin" ||
26-
parsedParams.length === 0
27-
) {
28-
shell.openPath(parsedPath);
29-
return;
30-
}
31-
32-
spawn(parsedPath, parsedParams, { shell: false, detached: true });
21+
shell.openPath(parsedPath);
3322
};
3423

3524
registerEvent("openGame", openGame);

src/renderer/src/pages/game-details/modals/game-options-modal.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ export function GameOptionsModal({
141141
const shouldShowWinePrefixConfiguration =
142142
window.electron.platform === "linux";
143143

144-
const shouldShowLaunchOptionsConfiguration =
145-
window.electron.platform === "win32";
144+
const shouldShowLaunchOptionsConfiguration = false;
146145

147146
return (
148147
<>

0 commit comments

Comments
 (0)