From ccfbd5f22a74150c943145b8a14bf2a25e7bbac9 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Tue, 16 May 2023 12:10:17 +0200 Subject: [PATCH] 1.2.3 - apply selected session before launching the game --- Cargo.toml | 2 +- src/games/genshin/game.rs | 5 +++++ src/games/honkai/game.rs | 5 +++++ src/games/star_rail/game.rs | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b91df09..10335fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anime-launcher-sdk" -version = "1.2.2" +version = "1.2.3" authors = ["Nikita Podvirnyy "] license = "GPL-3.0" readme = "README.md" diff --git a/src/games/genshin/game.rs b/src/games/genshin/game.rs index ab24bd0..ba73af7 100644 --- a/src/games/genshin/game.rs +++ b/src/games/genshin/game.rs @@ -245,6 +245,11 @@ pub fn run() -> anyhow::Result<()> { command.envs(config.game.environment); + #[cfg(feature = "sessions")] + if let Some(current) = Sessions::get_current()? { + Sessions::apply(current, &folders.prefix)?; + } + // Run command let variables = command diff --git a/src/games/honkai/game.rs b/src/games/honkai/game.rs index 7f4de32..558442c 100644 --- a/src/games/honkai/game.rs +++ b/src/games/honkai/game.rs @@ -181,6 +181,11 @@ pub fn run() -> anyhow::Result<()> { command.envs(config.game.environment); + #[cfg(feature = "sessions")] + if let Some(current) = Sessions::get_current()? { + Sessions::apply(current, &folders.prefix)?; + } + // Run command let variables = command diff --git a/src/games/star_rail/game.rs b/src/games/star_rail/game.rs index 2ebe963..d81d37b 100644 --- a/src/games/star_rail/game.rs +++ b/src/games/star_rail/game.rs @@ -182,6 +182,11 @@ pub fn run() -> anyhow::Result<()> { command.envs(config.game.environment); + #[cfg(feature = "sessions")] + if let Some(current) = Sessions::get_current()? { + Sessions::apply(current, &folders.prefix)?; + } + // Run command let variables = command