- changed default game/prefix paths
- fixed `LauncherState::WineNotInstalled` getting
This commit is contained in:
Observer KRypt0n_ 2023-03-16 14:23:44 +02:00
parent c5ca8d533c
commit f244a20b42
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
4 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "anime-launcher-sdk"
version = "0.5.2"
version = "0.5.3"
authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"]
license = "GPL-3.0"
readme = "README.md"

View file

@ -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")
],

View file

@ -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(),

View file

@ -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);