diff --git a/Cargo.lock b/Cargo.lock index 6f8cf691..e428af92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5773,6 +5773,7 @@ dependencies = [ "libc", "mio", "pin-project-lite", + "signal-hook-registry", "socket2", "tokio-macros", "windows-sys 0.61.2", diff --git a/Cargo.toml b/Cargo.toml index fa650350..6f38f673 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ sha2 = "0.11" sdl3-sys = { version = "0.6", features = ["build-from-source-static"] } sdl3-ttf-sys = { version = "0.6", features = ["build-from-source-static", "no-sdlttf-harfbuzz", "no-sdlttf-plutosvg"] } rfd = "0.17" -tokio = {version = "1.46", features = ["rt-multi-thread", "macros", "fs"] } +tokio = {version = "1.46", features = ["rt-multi-thread", "macros", "fs", "process"] } spin_sleep = "1.3" encoding_rs = "0.8" mimalloc = "0.1" diff --git a/src/ui/gui.rs b/src/ui/gui.rs index 80c945a2..fdfb9f59 100644 --- a/src/ui/gui.rs +++ b/src/ui/gui.rs @@ -216,7 +216,7 @@ fn controller_window( tokio::spawn(async move { let mut command = - std::process::Command::new(std::env::current_exe().unwrap()); + tokio::process::Command::new(std::env::current_exe().unwrap()); command.args([ "--configure-input-profile", &profile_name, @@ -226,7 +226,7 @@ fn controller_window( if dinput { command.arg("--use-dinput"); } - if !command.status().unwrap().success() { + if !command.status().await.unwrap().success() { eprintln!("Failed to configure input profile"); } let game_ui = ui::Ui::new(); @@ -379,7 +379,7 @@ pub fn run_rom( weak.upgrade_in_event_loop(move |handle| handle.set_game_running(true)) .unwrap(); - let mut command = std::process::Command::new(std::env::current_exe().unwrap()); + let mut command = tokio::process::Command::new(std::env::current_exe().unwrap()); command.args([ "--overclock", &game_settings.overclock.to_string(), @@ -421,6 +421,7 @@ pub fn run_rom( if !command .arg(file_path.to_str().unwrap()) .status() + .await .unwrap() .success() {