"Fixed" --run-game flag work

Yes I just added 5 secs delay before closing the app. It works so don't care
This commit is contained in:
Observer KRypt0n_ 2022-10-28 18:36:45 +02:00
parent c6e70cbdf7
commit f47bbfce4a
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
2 changed files with 2 additions and 2 deletions

View file

@ -1,4 +1,3 @@
use std::path::Path;
use std::process::Command;
use anime_game_core::genshin::telemetry;
@ -67,7 +66,7 @@ pub fn try_get_terminal() -> Option<Terminal> {
pub fn run() -> anyhow::Result<()> {
let config = config::get()?;
if !Path::new(&config.game.path).exists() {
if !config.game.path.exists() {
return Err(anyhow::anyhow!("Game is not installed"));
}

View file

@ -112,6 +112,7 @@ fn main() {
lib::launcher::states::LauncherState::Launch => {
main.update(ui::main::Actions::PerformButtonEvent).unwrap();
std::thread::sleep(std::time::Duration::from_secs(5));
std::process::exit(0);
},
_ => main.show()