From fc70da192239f12bfa3864b1a07c60401bc37d5f Mon Sep 17 00:00:00 2001 From: Matt Dallmeyer Date: Wed, 8 Nov 2023 15:52:33 -0800 Subject: [PATCH] pass --game to goalc (#380) --- src-tauri/src/commands/binaries.rs | 32 +++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src-tauri/src/commands/binaries.rs b/src-tauri/src/commands/binaries.rs index 153dd7a3..c5a2e0c0 100644 --- a/src-tauri/src/commands/binaries.rs +++ b/src-tauri/src/commands/binaries.rs @@ -563,15 +563,29 @@ pub async fn open_repl( let data_folder = get_data_dir(&config_info, &game_name, false)?; let exec_info = get_exec_location(&config_info, "goalc")?; let mut command = Command::new("cmd"); - command - .args([ - "/K", - "start", - &bin_ext("goalc"), - "--proj-path", - &data_folder.to_string_lossy(), - ]) - .current_dir(exec_info.executable_dir); + if game_name == "jak1" { + command + .args([ + "/K", + "start", + &bin_ext("goalc"), + "--proj-path", + &data_folder.to_string_lossy(), + ]) + .current_dir(exec_info.executable_dir); + } else { + command + .args([ + "/K", + "start", + &bin_ext("goalc"), + "--proj-path", + &data_folder.to_string_lossy(), + "--game", + &game_name, + ]) + .current_dir(exec_info.executable_dir); + } #[cfg(windows)] { command.creation_flags(0x08000000);