From 5a72b9d6220be3f253c638f3525cc0bb5cd77d64 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Fri, 14 Aug 2026 18:31:53 -0400 Subject: [PATCH] More UI adjustments --- .../settings/model/view/SettingsItem.kt | 20 +++++++++++++++++++ .../settings/ui/SettingsDialogFragment.kt | 4 +++- .../settings/ui/SettingsFragmentPresenter.kt | 7 +------ .../app/src/main/res/values/strings.xml | 11 +++++----- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt index 629383cb12..0ca31062b3 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt @@ -72,6 +72,13 @@ abstract class SettingsItem( return false } + // A frame rate target moves the multiplier on its own + if (setting.key == IntSetting.RENDERER_FRAME_GEN_MULTIPLIER.key && + frameGenTargetRate != 0 + ) { + return false + } + // Can't edit settings that aren't saveable in per-game config even if they are switchable if (NativeConfig.isPerGameConfigLoaded() && !setting.isSaveable) { return false @@ -95,6 +102,19 @@ abstract class SettingsItem( val clearable: Boolean get() = !setting.global && NativeConfig.isPerGameConfigLoaded() + private val frameGenTargetRate: Int + get() { + val key = IntSetting.RENDERER_FRAME_GEN_TARGET_RATE.key + val needsGlobal = if (NativeLibrary.isRunning() && + !NativeConfig.isPerGameConfigLoaded() + ) { + !NativeConfig.usingGlobal(key) + } else { + NativeConfig.usingGlobal(key) + } + return IntSetting.RENDERER_FRAME_GEN_TARGET_RATE.getInt(needsGlobal) + } + companion object { private val frameGenKeys = setOf( BooleanSetting.RENDERER_FRAME_GEN.key, diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsDialogFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsDialogFragment.kt index 4e4ac47ea2..3ab864f906 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsDialogFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsDialogFragment.kt @@ -382,7 +382,9 @@ class SettingsDialogFragment : DialogFragment(), DialogInterface.OnClickListener } scSetting.setSelectedValue(value) - if (scSetting.setting.key == IntSetting.RENDERER_SCALING_FILTER.key) { + if (scSetting.setting.key == IntSetting.RENDERER_SCALING_FILTER.key || + scSetting.setting.key == IntSetting.RENDERER_FRAME_GEN_TARGET_RATE.key + ) { settingsViewModel.setShouldReloadSettingsList(true) } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index fba97859ea..1a3fa2fd17 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -99,12 +99,7 @@ class SettingsFragmentPresenter( add(BooleanSetting.RENDERER_FRAME_GEN.key) add(IntSetting.RENDERER_FRAME_GEN_TARGET_RATE.key) - if (IntSetting.RENDERER_FRAME_GEN_TARGET_RATE.getInt( - getNeedsGlobalForKey(IntSetting.RENDERER_FRAME_GEN_TARGET_RATE.key) - ) == 0 - ) { - add(IntSetting.RENDERER_FRAME_GEN_MULTIPLIER.key) - } + add(IntSetting.RENDERER_FRAME_GEN_MULTIPLIER.key) add(IntSetting.RENDERER_FRAME_GEN_QUEUE_TARGET.key) add(BooleanSetting.RENDERER_FRAME_GEN_FLOW_SCALE_AUTO.key) if (!BooleanSetting.RENDERER_FRAME_GEN_FLOW_SCALE_AUTO.getBoolean( diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 27e5c49394..213bd1bee6 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -308,7 +308,7 @@ 4x Target frame rate Pick the rate your display can actually show. The multiplier then rises or falls on its own to hold it, and rolls back any step that makes the game itself run slower. - Off (use a fixed multiplier) + Use a fixed multiplier 60 FPS 90 FPS 120 FPS @@ -316,15 +316,15 @@ 165 FPS Frame queue target How many finished frames may wait ahead of the display. Larger queues absorb GPU spikes at the cost of input latency. - Unbuffered (lowest latency) - One frame (balanced) - Two frames (smoothest) + Lowest latency (Unbuffered) + Balanced (1 frame) + Smoothest (2 frames) Match motion estimation to the game Estimate motion at the resolution the game actually renders instead of the upscaled output. Costs nothing in accuracy, since upscaling adds no motion detail. Motion estimation resolution Resolution of the optical flow pass, as a fraction of the output. Lowering it is the cheapest way to reclaim performance. Half precision shaders - Use the 16-bit shader variant shipped in Lossless.dll. Falls back automatically if the driver or the file lacks it. + Use the 16-bit shader variant. Falls back automatically if the driver or the file lacks it. Dump generated frame Write the optical flow mip levels and the interpolated frame to the lossless/debug folder once, for troubleshooting Frame generation unavailable @@ -340,7 +340,6 @@ Provide your own copy of Lossless.dll to enable frame generation Installed Not installed - Lossless.dll is installed and contains every shader frame generation needs. Replace Remove Delete the installed Lossless.dll and its prepared shaders