use tokio process (#779)

This commit is contained in:
Logan McNaughton
2026-04-19 23:00:39 -06:00
committed by GitHub
parent edb6960d4f
commit f520aeab82
3 changed files with 6 additions and 4 deletions
Generated
+1
View File
@@ -5773,6 +5773,7 @@ dependencies = [
"libc",
"mio",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
"windows-sys 0.61.2",
+1 -1
View File
@@ -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"
+4 -3
View File
@@ -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()
{