mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-02 16:23:48 +03:00
fix: open game with parameters
This commit is contained in:
parent
0661cbd661
commit
1226483deb
@ -58,7 +58,7 @@
|
||||
},
|
||||
"game_details": {
|
||||
"launch_options": "Опции за стартиране",
|
||||
"launch_options_description": "Напредналите потребители могат да въведат модификации на своите опции за стартиране",
|
||||
"launch_options_description": "Напредналите потребители могат да въведат модификации на своите опции за стартиране (экспериментальный)",
|
||||
"launch_options_placeholder": "Няма зададен параметър",
|
||||
"open_download_options": "Варианти за изтегляне",
|
||||
"download_options_zero": "Няма варианти за изтегляне",
|
||||
|
@ -168,7 +168,7 @@
|
||||
"wine_prefix": "Wine Prefix",
|
||||
"wine_prefix_description": "The Wine prefix used to run this game",
|
||||
"launch_options": "Launch Options",
|
||||
"launch_options_description": "Advanced users may choose to enter modifications to their launch options",
|
||||
"launch_options_description": "Advanced users may choose to enter modifications to their launch options (experimental feature)",
|
||||
"launch_options_placeholder": "No parameter specified",
|
||||
"no_download_option_info": "No information available",
|
||||
"backup_deletion_failed": "Failed to delete backup",
|
||||
|
@ -156,7 +156,7 @@
|
||||
"wine_prefix": "Prefixo Wine",
|
||||
"wine_prefix_description": "O prefixo Wine que foi utilizado para instalar o jogo",
|
||||
"launch_options": "Opções de Inicialização",
|
||||
"launch_options_description": "Usuários avançados podem adicionar opções de inicialização no jogo",
|
||||
"launch_options_description": "Usuários avançados podem adicionar opções de inicialização no jogo (experimental)",
|
||||
"launch_options_placeholder": "Nenhum parâmetro informado",
|
||||
"no_download_option_info": "Sem informações disponíveis",
|
||||
"backup_deletion_failed": "Falha ao apagar backup",
|
||||
|
@ -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 });
|
||||
}
|
||||
};
|
||||
|
||||
registerEvent("openGame", openGame);
|
||||
|
Loading…
Reference in New Issue
Block a user