mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-12 19:22:28 +00:00
fix: added detached to the spawn to fix the game closing with the launcher
This commit is contained in:
parent
e1904b853e
commit
c098d8ffcf
1 changed files with 5 additions and 2 deletions
|
@ -15,14 +15,17 @@ const openGame = async (
|
|||
const parsedPath = parseExecutablePath(executablePath);
|
||||
const parsedParams = parseLaunchOptions(launchOptions);
|
||||
|
||||
await gameRepository.update({ id: gameId }, { executablePath: parsedPath, launchOptions });
|
||||
await gameRepository.update(
|
||||
{ id: gameId },
|
||||
{ executablePath: parsedPath, launchOptions }
|
||||
);
|
||||
|
||||
if (process.platform === "linux" || process.platform === "darwin") {
|
||||
shell.openPath(parsedPath);
|
||||
}
|
||||
|
||||
if (process.platform === "win32") {
|
||||
spawn(parsedPath, parsedParams, { shell: false });
|
||||
spawn(parsedPath, parsedParams, { shell: false, detached: true });
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue