mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 01:03:57 +00:00
fix: open game with parameters
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user