feat(ui): set fsr quality in enhancements settings instead of strength

This commit is contained in:
Observer KRypt0n_ 2023-05-22 22:45:53 +02:00
parent 45fab721dc
commit 6e847c61f5
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
3 changed files with 6 additions and 14 deletions

4
Cargo.lock generated
View file

@ -96,8 +96,8 @@ dependencies = [
[[package]]
name = "anime-launcher-sdk"
version = "1.4.1"
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.4.1#7a63cb4d07048fc7c3126c44148472778b371915"
version = "1.4.2"
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.4.2#62e31155f21525f8653ac08ab7ebd477d06fef32"
dependencies = [
"anime-game-core",
"anyhow",

View file

@ -17,7 +17,7 @@ glib-build-tools = "0.17"
[dependencies.anime-launcher-sdk]
git = "https://github.com/an-anime-team/anime-launcher-sdk"
tag = "1.4.1"
tag = "1.4.2"
features = ["all", "genshin"]
# path = "../anime-launcher-sdk" # ! for dev purposes only

View file

@ -264,20 +264,12 @@ impl SimpleAsyncComponent for EnhancementsApp {
&tr("performance")
]),
// FSR strength selection
//
// Ultra Quality = 5
// Quality = 4
// Balanced = 3
// Performance = 2
//
// Source: Bottles (https://github.com/bottlesdevs/Bottles/blob/22fa3573a13f4e9b9c429e4cdfe4ca29787a2832/src/ui/details-preferences.ui#L88)
set_selected: 5 - CONFIG.game.enhancements.fsr.strength as u32,
set_selected: CONFIG.game.enhancements.fsr.quality.ordinal() as u32,
connect_selected_notify => |row| {
connect_selected_notify => |row| unsafe {
if is_ready() {
if let Ok(mut config) = Config::get() {
config.game.enhancements.fsr.strength = 5 - row.selected() as u64;
config.game.enhancements.fsr.quality = FsrQuality::from_ordinal_unsafe(row.selected() as i8);
Config::update(config);
}