mirror of https://git.suyu.dev/suyu/suyu
android: settings: Add scaling filter & anti-aliasing options. (#66)
This commit is contained in:
parent
4006468f73
commit
d2e55558df
|
@ -194,6 +194,10 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
val rendererBackend = rendererSection!!.getSetting(SettingsFile.KEY_RENDERER_BACKEND)
|
val rendererBackend = rendererSection!!.getSetting(SettingsFile.KEY_RENDERER_BACKEND)
|
||||||
val rendererAccuracy = rendererSection.getSetting(SettingsFile.KEY_RENDERER_ACCURACY)
|
val rendererAccuracy = rendererSection.getSetting(SettingsFile.KEY_RENDERER_ACCURACY)
|
||||||
val rendererResolution = rendererSection.getSetting(SettingsFile.KEY_RENDERER_RESOLUTION)
|
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 =
|
val rendererAspectRatio =
|
||||||
rendererSection.getSetting(SettingsFile.KEY_RENDERER_ASPECT_RATIO)
|
rendererSection.getSetting(SettingsFile.KEY_RENDERER_ASPECT_RATIO)
|
||||||
val rendererUseDiskShaderCache =
|
val rendererUseDiskShaderCache =
|
||||||
|
@ -240,6 +244,30 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
2
|
2
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
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(
|
add(
|
||||||
SingleChoiceSetting(
|
SingleChoiceSetting(
|
||||||
SettingsFile.KEY_RENDERER_ASPECT_RATIO,
|
SettingsFile.KEY_RENDERER_ASPECT_RATIO,
|
||||||
|
|
|
@ -34,6 +34,8 @@ object SettingsFile {
|
||||||
|
|
||||||
// Renderer
|
// Renderer
|
||||||
const val KEY_RENDERER_RESOLUTION = "resolution_setup"
|
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_ASPECT_RATIO = "aspect_ratio"
|
||||||
const val KEY_RENDERER_ACCURACY = "gpu_accuracy"
|
const val KEY_RENDERER_ACCURACY = "gpu_accuracy"
|
||||||
const val KEY_RENDERER_USE_DISK_SHADER_CACHE = "use_disk_shader_cache"
|
const val KEY_RENDERER_USE_DISK_SHADER_CACHE = "use_disk_shader_cache"
|
||||||
|
|
|
@ -121,6 +121,36 @@
|
||||||
<item>4</item>
|
<item>4</item>
|
||||||
</integer-array>
|
</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">
|
<string-array name="cpuAccuracyNames">
|
||||||
<item>@string/cpu_accuracy_auto</item>
|
<item>@string/cpu_accuracy_auto</item>
|
||||||
<item>@string/cpu_accuracy_accurate</item>
|
<item>@string/cpu_accuracy_accurate</item>
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
<string name="renderer_accuracy">Accuracy level</string>
|
<string name="renderer_accuracy">Accuracy level</string>
|
||||||
<string name="renderer_resolution">Resolution</string>
|
<string name="renderer_resolution">Resolution</string>
|
||||||
<string name="renderer_aspect_ratio">Aspect Ratio</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">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_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>
|
<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_three">3X (2160p/3240p) (Slow)</string>
|
||||||
<string name="resolution_four">4X (2880p/4320p) (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 -->
|
<!-- Aspect Ratios -->
|
||||||
<string name="ratio_default">Default (16:9)</string>
|
<string name="ratio_default">Default (16:9)</string>
|
||||||
<string name="ratio_force_four_three">Force 4:3</string>
|
<string name="ratio_force_four_three">Force 4:3</string>
|
||||||
|
|
Loading…
Reference in New Issue