diff --git a/Cargo.toml b/Cargo.toml index f85eb0c..6b80f84 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anime-launcher-sdk" -version = "0.5.2" +version = "0.5.3" authors = ["Nikita Podvirnyy "] license = "GPL-3.0" readme = "README.md" diff --git a/src/config/game/mod.rs b/src/config/game/mod.rs index 7bc110d..46be86d 100644 --- a/src/config/game/mod.rs +++ b/src/config/game/mod.rs @@ -36,7 +36,7 @@ impl Default for Game { let launcher_dir = launcher_dir().expect("Failed to get launcher dir"); Self { - path: launcher_dir.join("game/drive_c/Program Files/Genshin Impact"), + path: launcher_dir.join("Genshin Impact"), // TODO: change it based on GameEdition voices: vec![ String::from("en-us") ], diff --git a/src/config/game/wine/mod.rs b/src/config/game/wine/mod.rs index 911a7e6..15c3db9 100644 --- a/src/config/game/wine/mod.rs +++ b/src/config/game/wine/mod.rs @@ -34,7 +34,7 @@ impl Default for Wine { let launcher_dir = launcher_dir().expect("Failed to get launcher dir"); Self { - prefix: launcher_dir.join("game"), + prefix: launcher_dir.join("prefix"), builds: launcher_dir.join("runners"), selected: None, sync: WineSync::default(), diff --git a/src/states.rs b/src/states.rs index 4cde909..9cadd9a 100644 --- a/src/states.rs +++ b/src/states.rs @@ -154,6 +154,10 @@ impl LauncherState { #[cfg(feature = "components")] { if let Some(wine) = config.get_selected_wine()? { + if !config.game.wine.builds.join(&wine.name).exists() { + return Ok(Self::WineNotInstalled); + } + let wine = wine .to_wine(&config.components.path, Some(&config.game.wine.builds.join(&wine.name))) .with_prefix(&config.game.wine.prefix);