From 755c45777ffacffacc8265392fd571ad188278c6 Mon Sep 17 00:00:00 2001 From: t895 Date: Fri, 29 Dec 2023 17:27:36 -0500 Subject: [PATCH 1/3] android: Pair fastmem toggle to CPU Debug toggle Hides fastmem toggle when CPU Debugging is disabled --- .../yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt | 1 + 1 file changed, 1 insertion(+) 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 2e97aee2c..fd69f2623 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 @@ -298,6 +298,7 @@ abstract class SettingsItem( override val key: String = FASTMEM_COMBINED override val isRuntimeModifiable: Boolean = false + override val pairedSettingKey = BooleanSetting.CPU_DEBUG_MODE.key override val defaultValue: Boolean = true override val isSwitchable: Boolean = true override var global: Boolean From 347b3bd18dd13d2ba1ba7d3d94742a4b64330f66 Mon Sep 17 00:00:00 2001 From: t895 Date: Fri, 29 Dec 2023 17:28:01 -0500 Subject: [PATCH 2/3] android: Center switch setting title when no description is present --- .../app/src/main/res/layout/list_item_setting_switch.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/app/src/main/res/layout/list_item_setting_switch.xml b/src/android/app/src/main/res/layout/list_item_setting_switch.xml index 5cb84182e..1c08e2e1b 100644 --- a/src/android/app/src/main/res/layout/list_item_setting_switch.xml +++ b/src/android/app/src/main/res/layout/list_item_setting_switch.xml @@ -24,7 +24,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginEnd="24dp" - android:gravity="center_vertical" + android:layout_gravity="center_vertical" android:orientation="vertical" android:layout_weight="1"> From 21e7f86697b2134d8533aae5f27030ff00de0173 Mon Sep 17 00:00:00 2001 From: t895 Date: Fri, 29 Dec 2023 17:43:36 -0500 Subject: [PATCH 3/3] android: Expose anisotropic filtering setting --- .../features/settings/model/IntSetting.kt | 3 ++- .../settings/model/view/SettingsItem.kt | 9 +++++++++ .../settings/ui/SettingsFragmentPresenter.kt | 1 + src/android/app/src/main/res/values/arrays.xml | 17 +++++++++++++++++ src/android/app/src/main/res/values/strings.xml | 8 ++++++++ 5 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt index 21e4e1afd..df760440f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt @@ -18,7 +18,8 @@ enum class IntSetting(override val key: String) : AbstractIntSetting { RENDERER_ANTI_ALIASING("anti_aliasing"), RENDERER_SCREEN_LAYOUT("screen_layout"), RENDERER_ASPECT_RATIO("aspect_ratio"), - AUDIO_OUTPUT_ENGINE("output_engine"); + AUDIO_OUTPUT_ENGINE("output_engine"), + MAX_ANISOTROPY("max_anisotropy"); override fun getInt(needsGlobal: Boolean): Int = NativeConfig.getInt(key, needsGlobal) 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 fd69f2623..12f7aa1ab 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 @@ -243,6 +243,15 @@ abstract class SettingsItem( R.string.renderer_reactive_flushing_description ) ) + put( + SingleChoiceSetting( + IntSetting.MAX_ANISOTROPY, + R.string.anisotropic_filtering, + R.string.anisotropic_filtering_description, + R.array.anisoEntries, + R.array.anisoValues + ) + ) put( SingleChoiceSetting( IntSetting.AUDIO_OUTPUT_ENGINE, 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 a7e965589..db1a1076c 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 @@ -149,6 +149,7 @@ class SettingsFragmentPresenter( add(IntSetting.RENDERER_VSYNC.key) add(IntSetting.RENDERER_SCALING_FILTER.key) add(IntSetting.RENDERER_ANTI_ALIASING.key) + add(IntSetting.MAX_ANISOTROPY.key) add(IntSetting.RENDERER_SCREEN_LAYOUT.key) add(IntSetting.RENDERER_ASPECT_RATIO.key) add(BooleanSetting.PICTURE_IN_PICTURE.key) diff --git a/src/android/app/src/main/res/values/arrays.xml b/src/android/app/src/main/res/values/arrays.xml index e3915ef4f..c882a8e62 100644 --- a/src/android/app/src/main/res/values/arrays.xml +++ b/src/android/app/src/main/res/values/arrays.xml @@ -267,4 +267,21 @@ 3 + + @string/auto + @string/slider_default + @string/multiplier_two + @string/multiplier_four + @string/multiplier_eight + @string/multiplier_sixteen + + + 0 + 1 + 2 + 3 + 4 + 5 + + diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 0b80b04a4..4d5c268fe 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -225,6 +225,8 @@ Improves rendering accuracy in some games at the cost of performance. Disk shader cache Reduces stuttering by locally storing and loading generated shaders. + Anisotropic filtering + Improves the quality of textures when viewed at oblique angles CPU @@ -506,6 +508,12 @@ oboe cubeb + + 2x + 4x + 8x + 16x + Black backgrounds When using the dark theme, apply black backgrounds.