0.5.3
- changed default game/prefix paths - fixed `LauncherState::WineNotInstalled` getting
This commit is contained in:
parent
c5ca8d533c
commit
f244a20b42
4 changed files with 7 additions and 3 deletions
|
@ -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"
|
||||
|
|
|
@ -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")
|
||||
],
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue