diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 9d3b8297f..5d71713a3 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -453,10 +453,6 @@ async fn get_available_northstar_versions() -> Result Ok("Started game".to_string()), Err(_err) => Err("Failed to launch Titanfall 2 via Steam".to_string()), - }; - - let is_err = retval.is_err(); - - // Handle the rest in the backround - tauri::async_runtime::spawn(async move { - // Starting the EA app and Titanfall might take a good minute or three - let mut wait_countdown = 60 * 3; - while wait_countdown > 0 && !util::check_northstar_running() && !is_err { - sleep(Duration::from_millis(1000)).await; - wait_countdown -= 1; - } - - // Northstar may be running, but it may not have loaded the file yet - sleep(Duration::from_millis(2000)).await; - - // intentionally ignore Result - let _ = fs::remove_file(run_northstar); - - if Path::new(run_northstar_bak).exists() { - fs::rename(run_northstar_bak, run_northstar).unwrap(); - } - }); - - retval + } }