fix: fixed compatibility between sessions manager and sandbox

This commit is contained in:
Observer KRypt0n_ 2023-05-21 21:41:20 +02:00
parent f865af791e
commit 09e883c548
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
3 changed files with 12 additions and 12 deletions

View file

@ -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(())

View file

@ -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(())

View file

@ -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(())