diff --git a/src/games/genshin/game.rs b/src/games/genshin/game.rs index 4ce0812..2bf254d 100644 --- a/src/games/genshin/game.rs +++ b/src/games/genshin/game.rs @@ -253,11 +253,11 @@ pub fn run() -> anyhow::Result<()> { command.envs(config.game.wine.language.get_env_vars()); command.envs(config.game.wine.shared_libraries.get_env_vars(wine_folder)); - command.envs(config.game.environment); + command.envs(&config.game.environment); #[cfg(feature = "sessions")] if let Some(current) = Sessions::get_current()? { - Sessions::apply(current, &folders.prefix)?; + Sessions::apply(current, config.get_wine_prefix_path())?; } // Run command @@ -276,7 +276,7 @@ pub fn run() -> anyhow::Result<()> { #[cfg(feature = "discord-rpc")] let rpc = if config.launcher.discord_rpc.enabled { - Some(DiscordRpc::new(config.launcher.discord_rpc.into())) + Some(DiscordRpc::new(config.launcher.discord_rpc.clone().into())) } else { None }; @@ -304,7 +304,7 @@ pub fn run() -> anyhow::Result<()> { #[cfg(feature = "sessions")] if let Some(current) = Sessions::get_current()? { - Sessions::update(current, folders.prefix)?; + Sessions::update(current, config.get_wine_prefix_path())?; } Ok(()) diff --git a/src/games/honkai/game.rs b/src/games/honkai/game.rs index 39ec1b1..afc1dd5 100644 --- a/src/games/honkai/game.rs +++ b/src/games/honkai/game.rs @@ -189,11 +189,11 @@ pub fn run() -> anyhow::Result<()> { command.envs(config.game.wine.language.get_env_vars()); command.envs(config.game.wine.shared_libraries.get_env_vars(wine_folder)); - command.envs(config.game.environment); + command.envs(&config.game.environment); #[cfg(feature = "sessions")] if let Some(current) = Sessions::get_current()? { - Sessions::apply(current, &folders.prefix)?; + Sessions::apply(current, config.get_wine_prefix_path())?; } // Run command @@ -212,7 +212,7 @@ pub fn run() -> anyhow::Result<()> { #[cfg(feature = "discord-rpc")] let rpc = if config.launcher.discord_rpc.enabled { - Some(DiscordRpc::new(config.launcher.discord_rpc.into())) + Some(DiscordRpc::new(config.launcher.discord_rpc.clone().into())) } else { None }; @@ -240,7 +240,7 @@ pub fn run() -> anyhow::Result<()> { #[cfg(feature = "sessions")] if let Some(current) = Sessions::get_current()? { - Sessions::update(current, folders.prefix)?; + Sessions::update(current, config.get_wine_prefix_path())?; } Ok(()) diff --git a/src/games/star_rail/game.rs b/src/games/star_rail/game.rs index 0125e2d..8abe17e 100644 --- a/src/games/star_rail/game.rs +++ b/src/games/star_rail/game.rs @@ -190,11 +190,11 @@ pub fn run() -> anyhow::Result<()> { command.envs(config.game.wine.language.get_env_vars()); command.envs(config.game.wine.shared_libraries.get_env_vars(wine_folder)); - command.envs(config.game.environment); + command.envs(&config.game.environment); #[cfg(feature = "sessions")] if let Some(current) = Sessions::get_current()? { - Sessions::apply(current, &folders.prefix)?; + Sessions::apply(current, config.get_wine_prefix_path())?; } // Run command @@ -212,7 +212,7 @@ pub fn run() -> anyhow::Result<()> { #[cfg(feature = "discord-rpc")] let rpc = if config.launcher.discord_rpc.enabled { - Some(DiscordRpc::new(config.launcher.discord_rpc.into())) + Some(DiscordRpc::new(config.launcher.discord_rpc.clone().into())) } else { None }; @@ -240,7 +240,7 @@ pub fn run() -> anyhow::Result<()> { #[cfg(feature = "sessions")] if let Some(current) = Sessions::get_current()? { - Sessions::update(current, folders.prefix)?; + Sessions::update(current, config.get_wine_prefix_path())?; } Ok(())