summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-04-16 10:05:28 +0200
committerbunnei <bunneidev@gmail.com>2023-06-03 09:05:50 +0200
commitd2e55558dfe2b04eab5073b54e932c34bd1e9064 (patch)
tree64086267ef2666a123c5316eccbe6626052a93de
parentandroid: video_core: Add support for disk shader cache. (#64) (diff)
downloadyuzu-d2e55558dfe2b04eab5073b54e932c34bd1e9064.tar
yuzu-d2e55558dfe2b04eab5073b54e932c34bd1e9064.tar.gz
yuzu-d2e55558dfe2b04eab5073b54e932c34bd1e9064.tar.bz2
yuzu-d2e55558dfe2b04eab5073b54e932c34bd1e9064.tar.lz
yuzu-d2e55558dfe2b04eab5073b54e932c34bd1e9064.tar.xz
yuzu-d2e55558dfe2b04eab5073b54e932c34bd1e9064.tar.zst
yuzu-d2e55558dfe2b04eab5073b54e932c34bd1e9064.zip
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt28
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt2
-rw-r--r--src/android/app/src/main/res/values/arrays.xml30
-rw-r--r--src/android/app/src/main/res/values/strings.xml15
4 files changed, 75 insertions, 0 deletions
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 a137d1c3a..aeb262ce6 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
@@ -194,6 +194,10 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
val rendererBackend = rendererSection!!.getSetting(SettingsFile.KEY_RENDERER_BACKEND)
val rendererAccuracy = rendererSection.getSetting(SettingsFile.KEY_RENDERER_ACCURACY)
val rendererResolution = rendererSection.getSetting(SettingsFile.KEY_RENDERER_RESOLUTION)
+ val rendererScalingFilter =
+ rendererSection.getSetting(SettingsFile.KEY_RENDERER_SCALING_FILTER)
+ val rendererAntiAliasing =
+ rendererSection.getSetting(SettingsFile.KEY_RENDERER_ANTI_ALIASING)
val rendererAspectRatio =
rendererSection.getSetting(SettingsFile.KEY_RENDERER_ASPECT_RATIO)
val rendererUseDiskShaderCache =
@@ -242,6 +246,30 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
)
add(
SingleChoiceSetting(
+ SettingsFile.KEY_RENDERER_SCALING_FILTER,
+ Settings.SECTION_RENDERER,
+ rendererScalingFilter,
+ R.string.renderer_scaling_filter,
+ 0,
+ R.array.rendererScalingFilterNames,
+ R.array.rendererScalingFilterValues,
+ 1
+ )
+ )
+ add(
+ SingleChoiceSetting(
+ SettingsFile.KEY_RENDERER_ANTI_ALIASING,
+ Settings.SECTION_RENDERER,
+ rendererAntiAliasing,
+ R.string.renderer_anti_aliasing,
+ 0,
+ R.array.rendererAntiAliasingNames,
+ R.array.rendererAntiAliasingValues,
+ 0
+ )
+ )
+ add(
+ SingleChoiceSetting(
SettingsFile.KEY_RENDERER_ASPECT_RATIO,
Settings.SECTION_RENDERER,
rendererAspectRatio,
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt
index c518d9ba0..493d90954 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt
@@ -34,6 +34,8 @@ object SettingsFile {
// Renderer
const val KEY_RENDERER_RESOLUTION = "resolution_setup"
+ const val KEY_RENDERER_SCALING_FILTER = "scaling_filter"
+ const val KEY_RENDERER_ANTI_ALIASING = "anti_aliasing"
const val KEY_RENDERER_ASPECT_RATIO = "aspect_ratio"
const val KEY_RENDERER_ACCURACY = "gpu_accuracy"
const val KEY_RENDERER_USE_DISK_SHADER_CACHE = "use_disk_shader_cache"
diff --git a/src/android/app/src/main/res/values/arrays.xml b/src/android/app/src/main/res/values/arrays.xml
index 6d909ddae..628d43197 100644
--- a/src/android/app/src/main/res/values/arrays.xml
+++ b/src/android/app/src/main/res/values/arrays.xml
@@ -121,6 +121,36 @@
<item>4</item>
</integer-array>
+ <string-array name="rendererScalingFilterNames">
+ <item>@string/scaling_filter_nearest_neighbor</item>
+ <item>@string/scaling_filter_bilinear</item>
+ <item>@string/scaling_filter_bicubic</item>
+ <item>@string/scaling_filter_gaussian</item>
+ <item>@string/scaling_filter_scale_force</item>
+ <item>@string/scaling_filter_fsr</item>
+ </string-array>
+
+ <integer-array name="rendererScalingFilterValues">
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ </integer-array>
+
+ <string-array name="rendererAntiAliasingNames">
+ <item>@string/anti_aliasing_none</item>
+ <item>@string/anti_aliasing_fxaa</item>
+ <item>@string/anti_aliasing_smaa</item>
+ </string-array>
+
+ <integer-array name="rendererAntiAliasingValues">
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ </integer-array>
+
<string-array name="cpuAccuracyNames">
<item>@string/cpu_accuracy_auto</item>
<item>@string/cpu_accuracy_accurate</item>
diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml
index 45a9694d4..75d1f2293 100644
--- a/src/android/app/src/main/res/values/strings.xml
+++ b/src/android/app/src/main/res/values/strings.xml
@@ -29,6 +29,8 @@
<string name="renderer_accuracy">Accuracy level</string>
<string name="renderer_resolution">Resolution</string>
<string name="renderer_aspect_ratio">Aspect Ratio</string>
+ <string name="renderer_scaling_filter">Window Adapting Filter</string>
+ <string name="renderer_anti_aliasing">Anti-Aliasing Method</string>
<string name="renderer_force_max_clock">Force maximum clocks (Adreno only)</string>
<string name="renderer_force_max_clock_description">Forces the GPU to run at the maximum possible clocks (thermal constraints will still be applied).</string>
<string name="renderer_asynchronous_shaders">Use asynchronous shaders</string>
@@ -166,6 +168,19 @@
<string name="resolution_three">3X (2160p/3240p) (Slow)</string>
<string name="resolution_four">4X (2880p/4320p) (Slow)</string>
+ <!-- Scaling Filters -->
+ <string name="scaling_filter_nearest_neighbor">Nearest Neighbor</string>
+ <string name="scaling_filter_bilinear">Bilinear</string>
+ <string name="scaling_filter_bicubic">Bicubic</string>
+ <string name="scaling_filter_gaussian">Gaussian</string>
+ <string name="scaling_filter_scale_force">ScaleForce</string>
+ <string name="scaling_filter_fsr">AMD FidelityFX™ Super Resolution</string>
+
+ <!-- Anti-Aliasing -->
+ <string name="anti_aliasing_none">None</string>
+ <string name="anti_aliasing_fxaa">FXAA</string>
+ <string name="anti_aliasing_smaa">SMAA</string>
+
<!-- Aspect Ratios -->
<string name="ratio_default">Default (16:9)</string>
<string name="ratio_force_four_three">Force 4:3</string>