mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
fix: added detached to the spawn to fix the game closing with the launcher
This commit is contained in:
parent
e1904b853e
commit
c098d8ffcf
@ -15,14 +15,17 @@ const openGame = async (
|
|||||||
const parsedPath = parseExecutablePath(executablePath);
|
const parsedPath = parseExecutablePath(executablePath);
|
||||||
const parsedParams = parseLaunchOptions(launchOptions);
|
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") {
|
if (process.platform === "linux" || process.platform === "darwin") {
|
||||||
shell.openPath(parsedPath);
|
shell.openPath(parsedPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
spawn(parsedPath, parsedParams, { shell: false });
|
spawn(parsedPath, parsedParams, { shell: false, detached: true });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user