mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: open game with parameters
This commit is contained in:
parent
0661cbd661
commit
1226483deb
4 changed files with 10 additions and 7 deletions
|
@ -20,13 +20,16 @@ const openGame = async (
|
|||
{ executablePath: parsedPath, launchOptions }
|
||||
);
|
||||
|
||||
if (process.platform === "linux" || process.platform === "darwin") {
|
||||
if (
|
||||
process.platform === "linux" ||
|
||||
process.platform === "darwin" ||
|
||||
parsedParams.length === 0
|
||||
) {
|
||||
shell.openPath(parsedPath);
|
||||
return;
|
||||
}
|
||||
|
||||
if (process.platform === "win32") {
|
||||
spawn(parsedPath, parsedParams, { shell: false, detached: true });
|
||||
}
|
||||
spawn(parsedPath, parsedParams, { shell: false, detached: true });
|
||||
};
|
||||
|
||||
registerEvent("openGame", openGame);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue