diff --git a/src/games/honkai/config/mod.rs b/src/games/honkai/config/mod.rs index 1c9695f..6604261 100644 --- a/src/games/honkai/config/mod.rs +++ b/src/games/honkai/config/mod.rs @@ -42,7 +42,7 @@ impl ConfigExt for Config { #[inline] fn get() -> anyhow::Result { unsafe { - match &CONFIG { + match CONFIG.as_ref() { Some(config) => Ok(config.clone()), None => Self::get_raw() } diff --git a/src/games/honkai/config/schema/patch.rs b/src/games/honkai/config/schema/patch.rs index 0759b00..b82e351 100644 --- a/src/games/honkai/config/schema/patch.rs +++ b/src/games/honkai/config/schema/patch.rs @@ -7,8 +7,7 @@ use crate::honkai::consts::launcher_dir; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Patch { - pub path: PathBuf, - pub apply_mfplat: bool + pub path: PathBuf } impl Default for Patch { @@ -17,12 +16,7 @@ impl Default for Patch { let launcher_dir = launcher_dir().expect("Failed to get launcher dir"); Self { - path: launcher_dir.join("patch"), - - // Seems to not be needed with wine 8+ - // which is recommended by default, so will work - // for most of users - apply_mfplat: false + path: launcher_dir.join("patch") } } } @@ -35,11 +29,6 @@ impl From<&JsonValue> for Patch { path: match value.get("path").and_then(|path| path.as_str()).map(PathBuf::from) { Some(path) => path, None => default.path - }, - - apply_mfplat: match value.get("apply_mfplat") { - Some(value) => value.as_bool().unwrap_or(default.apply_mfplat), - None => default.apply_mfplat } } }