diff --git a/src/games/genshin/config/schema/game/fps_unlocker/config.rs b/src/games/genshin/config/schema/game/fps_unlocker/config.rs index 6216d93..3716328 100644 --- a/src/games/genshin/config/schema/game/fps_unlocker/config.rs +++ b/src/games/genshin/config/schema/game/fps_unlocker/config.rs @@ -4,7 +4,6 @@ use serde_json::Value as JsonValue; #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] pub struct Config { pub fps: u64, // TODO: Fps enum - pub periodic_writes: bool, pub interval: u64 } @@ -13,7 +12,6 @@ impl Default for Config { fn default() -> Self { Self { fps: 120, - periodic_writes: true, interval: 5000 } } @@ -29,11 +27,6 @@ impl From<&JsonValue> for Config { None => default.fps }, - periodic_writes: match value.get("periodic_writes") { - Some(value) => value.as_bool().unwrap_or(default.periodic_writes), - None => default.periodic_writes - }, - interval: match value.get("interval") { Some(value) => value.as_u64().unwrap_or(default.interval), None => default.interval diff --git a/src/games/genshin/game.rs b/src/games/genshin/game.rs index ec9e747..771d097 100644 --- a/src/games/genshin/game.rs +++ b/src/games/genshin/game.rs @@ -117,8 +117,7 @@ pub fn run() -> anyhow::Result<()> { // If patch applying is disabled, then game_executable is either GenshinImpact.exe or YuanShen.exe // so we don't need to check it here let unlocker_config = &config.game.enhancements.fps_unlocker.config; - let unlocker_interval = if unlocker_config.periodic_writes { unlocker_config.interval as i64 } else { -1 }; - std::fs::write(game_path.join("fps_unlocker.bat"), format!("start {game_executable} %*\n\nZ:\ncd \"{}\"\nstart fpsunlock.exe {} {unlocker_interval}", unlocker.dir().to_string_lossy(), unlocker_config.fps))?; + std::fs::write(game_path.join("fps_unlocker.bat"), format!("start {game_executable} %*\n\nZ:\ncd \"{}\"\nstart fpsunlock.exe {} {}", unlocker.dir().to_string_lossy(), unlocker_config.fps, unlocker_config.interval))?; } // Generate `config.ini` if environment emulation feature is presented