diff --git a/src/main.rs b/src/main.rs index 8911d3f4..0a280798 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,26 +43,26 @@ lazy_static::lazy_static! { pub static ref GAME: Game = Game::new(&CONFIG.game.path, ()); - /// Path to launcher folder. Standard is `$HOME/.local/share/anime-game-launcher` + /// Path to launcher folder. Standard is `$HOME/.local/share/honkers-launcher` pub static ref LAUNCHER_FOLDER: PathBuf = launcher_dir().expect("Failed to get launcher folder"); - /// Path to launcher's cache folder. Standard is `$HOME/.cache/anime-game-launcher` + /// Path to launcher's cache folder. Standard is `$HOME/.cache/honkers-launcher` pub static ref CACHE_FOLDER: PathBuf = cache_dir().expect("Failed to get launcher's cache folder"); - /// Path to `debug.log` file. Standard is `$HOME/.local/share/anime-game-launcher/debug.log` + /// Path to `debug.log` file. Standard is `$HOME/.local/share/honkers-launcher/debug.log` pub static ref DEBUG_FILE: PathBuf = LAUNCHER_FOLDER.join("debug.log"); - /// Path to `background` file. Standard is `$HOME/.cache/anime-game-launcher/background` + /// Path to `background` file. Standard is `$HOME/.cache/honkers-launcher/background` pub static ref BACKGROUND_FILE: PathBuf = CACHE_FOLDER.join("background"); /// Path to `.keep-background` file. Used to mark launcher that it shouldn't update background picture /// - /// Standard is `$HOME/.local/share/anime-game-launcher/.keep-background` + /// Standard is `$HOME/.local/share/honkers-launcher/.keep-background` pub static ref KEEP_BACKGROUND_FILE: PathBuf = LAUNCHER_FOLDER.join(".keep-background"); /// Path to `.first-run` file. Used to mark launcher that it should run FirstRun window /// - /// Standard is `$HOME/.local/share/anime-game-launcher/.first-run` + /// Standard is `$HOME/.local/share/honkers-launcher/.first-run` pub static ref FIRST_RUN_FILE: PathBuf = LAUNCHER_FOLDER.join(".first-run"); } @@ -190,10 +190,23 @@ fn main() { let state = LauncherState::get_from_config(|_| {}) .expect("Failed to get launcher state"); - if let LauncherState::Launch = state { - anime_launcher_sdk::honkai::game::run().expect("Failed to run the game"); + match state { + LauncherState::Launch => { + anime_launcher_sdk::honkai::game::run().expect("Failed to run the game"); - return; + return; + } + + LauncherState::PatchNotVerified | + LauncherState::PatchUpdateAvailable => { + if just_run_game { + anime_launcher_sdk::honkai::game::run().expect("Failed to run the game"); + + return; + } + } + + _ => () } }