Merge pull request #41 from FichteForks/pr/just-run-patch-not-verified
Allow `--just-run-game` for unverified patch
This commit is contained in:
commit
a94146574a
1 changed files with 5 additions and 12 deletions
17
src/main.rs
17
src/main.rs
|
@ -189,22 +189,15 @@ fn main() {
|
||||||
let state = LauncherState::get_from_config(|_| {})
|
let state = LauncherState::get_from_config(|_| {})
|
||||||
.expect("Failed to get launcher state");
|
.expect("Failed to get launcher state");
|
||||||
|
|
||||||
match state {
|
match (state, just_run_game) {
|
||||||
LauncherState::Launch => {
|
(LauncherState::Launch, _) |
|
||||||
|
(LauncherState::PatchNotVerified, true) |
|
||||||
|
(LauncherState::PredownloadAvailable { .. }, true) |
|
||||||
|
(LauncherState::PatchUpdateAvailable, true) => {
|
||||||
anime_launcher_sdk::star_rail::game::run().expect("Failed to run the game");
|
anime_launcher_sdk::star_rail::game::run().expect("Failed to run the game");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LauncherState::PredownloadAvailable { .. } |
|
|
||||||
LauncherState::PatchUpdateAvailable => {
|
|
||||||
if just_run_game {
|
|
||||||
anime_launcher_sdk::star_rail::game::run().expect("Failed to run the game");
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_ => ()
|
_ => ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue