diff --git a/CHANGELOG.md b/CHANGELOG.md index dbd395d..aab0f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Added a workaround to remove outdated `Telemetry.dll` file which fixes login error 400 in game login screen + ## [1.2.4] - 17.07.2023 ### Fixed diff --git a/src/ui/about.rs b/src/ui/about.rs index cd6bd99..078b327 100644 --- a/src/ui/about.rs +++ b/src/ui/about.rs @@ -93,9 +93,7 @@ impl SimpleComponent for AboutDialog { "

Fixed

", "", ].join("\n"), diff --git a/src/ui/main/launch.rs b/src/ui/main/launch.rs index e74164f..c1dace2 100644 --- a/src/ui/main/launch.rs +++ b/src/ui/main/launch.rs @@ -2,13 +2,31 @@ use relm4::prelude::*; use crate::i18n::*; +use anime_launcher_sdk::config::ConfigExt; +use anime_launcher_sdk::star_rail::config::Config; + use super::{App, AppMsg}; pub fn launch(sender: ComponentSender) { sender.input(AppMsg::HideWindow); std::thread::spawn(move || { - if let Err(err) = anime_launcher_sdk::star_rail::game::run() { + // Workaround of an issue appeared in 1.2 game update with lowercased telemetry.dll file + // This block will eventually be removed + let result = Config::get().and_then(|config| { + let telemetry = config.game.path + .for_edition(config.launcher.edition) + .join("StarRail_Data/Plugins/x86_64/Telemetry.dll"); + + if telemetry.exists() { + std::fs::remove_file(telemetry)?; + } + + Ok(()) + }).and_then(|_| anime_launcher_sdk::star_rail::game::run()); + + // if let Err(err) = anime_launcher_sdk::star_rail::game::run() { + if let Err(err) = result { tracing::error!("Failed to launch game: {err}"); sender.input(AppMsg::Toast {