mirror of
https://github.com/gopher64/gopher64.git
synced 2026-07-11 01:25:20 +02:00
use tokio process (#779)
This commit is contained in:
Generated
+1
@@ -5773,6 +5773,7 @@ dependencies = [
|
||||
"libc",
|
||||
"mio",
|
||||
"pin-project-lite",
|
||||
"signal-hook-registry",
|
||||
"socket2",
|
||||
"tokio-macros",
|
||||
"windows-sys 0.61.2",
|
||||
|
||||
+1
-1
@@ -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
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user