mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2025-04-02 15:03:27 +03:00
Added FSR support in game launching
This commit is contained in:
parent
eb2620f9cc
commit
40e6de29cf
2 changed files with 18 additions and 1 deletions
|
@ -195,3 +195,19 @@ impl Default for Fsr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Fsr {
|
||||||
|
/// Get environment variables corresponding to used amd fsr options
|
||||||
|
pub fn get_env_vars(&self) -> HashMap<&str, String> {
|
||||||
|
if self.enabled {
|
||||||
|
HashMap::from([
|
||||||
|
("WINE_FULLSCREEN_FSR", String::from("1")),
|
||||||
|
("WINE_FULLSCREEN_FSR_STRENGTH", self.strength.to_string())
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
HashMap::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -96,9 +96,10 @@ pub fn run(debug: bool) -> Result<(), Error> {
|
||||||
}
|
}
|
||||||
|
|
||||||
command.env("WINEPREFIX", &config.game.wine.prefix);
|
command.env("WINEPREFIX", &config.game.wine.prefix);
|
||||||
|
|
||||||
command.envs(config.game.wine.sync.get_env_vars());
|
command.envs(config.game.wine.sync.get_env_vars());
|
||||||
command.envs(config.game.enhancements.hud.get_env_vars());
|
command.envs(config.game.enhancements.hud.get_env_vars());
|
||||||
|
command.envs(config.game.enhancements.fsr.get_env_vars());
|
||||||
|
|
||||||
command.envs(config.game.environment)
|
command.envs(config.game.environment)
|
||||||
.current_dir(config.game.path)
|
.current_dir(config.game.path)
|
||||||
|
|
Loading…
Add table
Reference in a new issue