mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-06 02:33:44 -04:00
exposed new graphics settings
This commit is contained in:
parent
167d65748f
commit
4deb00e856
7 changed files with 106 additions and 6 deletions
|
|
@ -43,6 +43,9 @@ object SettingKeys {
|
|||
external fun frame_limit(): String
|
||||
external fun turbo_limit(): String
|
||||
external fun texture_filter(): String
|
||||
external fun antialiasing_filter(): String
|
||||
external fun fsr_sharpness(): String
|
||||
external fun output_scaling(): String
|
||||
external fun texture_sampling(): String
|
||||
external fun delay_game_render_thread_us(): String
|
||||
external fun layout_option(): String
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@ enum class IntSetting(
|
|||
PORTRAIT_BOTTOM_HEIGHT(SettingKeys.custom_portrait_bottom_height(),Settings.SECTION_LAYOUT,480),
|
||||
AUDIO_INPUT_TYPE(SettingKeys.input_type(), Settings.SECTION_AUDIO, 0),
|
||||
CPU_CLOCK_SPEED(SettingKeys.cpu_clock_percentage(), Settings.SECTION_CORE, 100),
|
||||
ANTIALIASING_FILTER(SettingKeys.antialiasing_filter(), Settings.SECTION_RENDERER, 0),
|
||||
FSR_SHARPNESS(SettingKeys.fsr_sharpness(), Settings.SECTION_RENDERER, 50),
|
||||
OUTPUT_SCALING(SettingKeys.output_scaling(), Settings.SECTION_RENDERER, 2),
|
||||
TEXTURE_FILTER(SettingKeys.texture_filter(), Settings.SECTION_RENDERER, 0),
|
||||
TEXTURE_SAMPLING(SettingKeys.texture_sampling(), Settings.SECTION_RENDERER, 0),
|
||||
USE_FRAME_LIMIT(SettingKeys.use_frame_limit(), Settings.SECTION_RENDERER, 1),
|
||||
|
|
|
|||
|
|
@ -922,14 +922,48 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|||
)
|
||||
)
|
||||
add(
|
||||
SwitchSetting(
|
||||
BooleanSetting.LINEAR_FILTERING,
|
||||
R.string.linear_filtering,
|
||||
R.string.linear_filtering_description,
|
||||
BooleanSetting.LINEAR_FILTERING.key,
|
||||
BooleanSetting.LINEAR_FILTERING.defaultValue
|
||||
SingleChoiceSetting(
|
||||
IntSetting.OUTPUT_SCALING,
|
||||
R.string.output_scaling_name,
|
||||
R.string.output_scaling_description,
|
||||
R.array.outputScalingNames,
|
||||
R.array.outputScalingValues,
|
||||
IntSetting.OUTPUT_SCALING.key,
|
||||
IntSetting.OUTPUT_SCALING.defaultValue
|
||||
)
|
||||
)
|
||||
add(
|
||||
SliderSetting(
|
||||
IntSetting.FSR_SHARPNESS,
|
||||
R.string.fsr_sharpness_name,
|
||||
R.string.fsr_sharpness_description,
|
||||
0,
|
||||
100,
|
||||
"%",
|
||||
IntSetting.FSR_SHARPNESS.key,
|
||||
IntSetting.FSR_SHARPNESS.defaultValue.toFloat()
|
||||
)
|
||||
)
|
||||
add(
|
||||
SingleChoiceSetting(
|
||||
IntSetting.ANTIALIASING_FILTER,
|
||||
R.string.antialiasing_filter_name,
|
||||
R.string.antialiasing_filter_description,
|
||||
R.array.antialiasingFilterNames,
|
||||
R.array.antialiasingFilterValues,
|
||||
IntSetting.ANTIALIASING_FILTER.key,
|
||||
IntSetting.ANTIALIASING_FILTER.defaultValue
|
||||
)
|
||||
)
|
||||
// add(
|
||||
// SwitchSetting(
|
||||
// BooleanSetting.LINEAR_FILTERING,
|
||||
// R.string.linear_filtering,
|
||||
// R.string.linear_filtering_description,
|
||||
// BooleanSetting.LINEAR_FILTERING.key,
|
||||
// BooleanSetting.LINEAR_FILTERING.defaultValue
|
||||
// )
|
||||
// )
|
||||
add(
|
||||
SwitchSetting(
|
||||
BooleanSetting.SHADERS_ACCURATE_MUL,
|
||||
|
|
|
|||
|
|
@ -153,6 +153,9 @@ void Config::ReadValues() {
|
|||
ReadSetting("Renderer", Settings::values.use_disk_shader_cache);
|
||||
ReadSetting("Renderer", Settings::values.use_vsync);
|
||||
ReadSetting("Renderer", Settings::values.texture_filter);
|
||||
ReadSetting("Renderer", Settings::values.output_scaling);
|
||||
ReadSetting("Renderer", Settings::values.fsr_sharpness);
|
||||
ReadSetting("Renderer", Settings::values.antialiasing_filter);
|
||||
ReadSetting("Renderer", Settings::values.texture_sampling);
|
||||
ReadSetting("Renderer", Settings::values.turbo_limit);
|
||||
// Workaround to map Android setting for enabling the frame limiter to the format Citra expects
|
||||
|
|
|
|||
|
|
@ -187,6 +187,17 @@ static const char* android_config_default_file_content = (BOOST_HANA_STRING(R"(
|
|||
# Loaded from shaders/anaglyph
|
||||
)") DECLARE_KEY(anaglyph_shader_name) BOOST_HANA_STRING(R"(
|
||||
|
||||
# Scaling mode for image output
|
||||
# 0: Nearest, 1: Bilinear, 2 (default): Adaptive, 3: FSR 1, 4: Sharp Bilinear
|
||||
)") DECLARE_KEY(output_scaling) BOOST_HANA_STRING(R"(
|
||||
|
||||
# Antialiasing filter to use
|
||||
# 0 (default): None, 1: FXAA, 2: SMAA
|
||||
)") DECLARE_KEY(antialiasing_filter) BOOST_HANA_STRING(R"(
|
||||
|
||||
# 0 - 100: Strength of FSR Sharpening. 50 (default)
|
||||
)") DECLARE_KEY(fsr_sharpness) BOOST_HANA_STRING(R"(
|
||||
|
||||
# Whether to enable linear filtering or not
|
||||
# This is required for some shaders to work correctly
|
||||
# 0: Nearest, 1 (default): Linear
|
||||
|
|
|
|||
|
|
@ -297,6 +297,34 @@
|
|||
<item>5</item>
|
||||
</integer-array>
|
||||
|
||||
<string-array name="outputScalingNames">
|
||||
<item>@string/nearest</item>
|
||||
<item>@string/bilinear</item>
|
||||
<item>@string/adaptive</item>
|
||||
<item>@string/fsr</item>
|
||||
<item>@string/sharpbilinear</item>
|
||||
</string-array>
|
||||
|
||||
<integer-array name="outputScalingValues">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
</integer-array>
|
||||
|
||||
<string-array name="antialiasingFilterNames">
|
||||
<item>@string/none</item>
|
||||
<item>@string/fxaa</item>
|
||||
<item>@string/smaa</item>
|
||||
</string-array>
|
||||
|
||||
<integer-array name="antialiasingFilterValues">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</integer-array>
|
||||
|
||||
<string-array name="textureSamplingNames">
|
||||
<item>@string/game_controlled</item>
|
||||
<item>@string/nearest_neighbor</item>
|
||||
|
|
|
|||
|
|
@ -262,6 +262,12 @@
|
|||
<string name="use_integer_scaling_description">Scales the screens with an integer multiplier of the original 3DS screen. For layouts with two different screen sizes, the largest screen is integer-scaled.</string>
|
||||
<string name="texture_filter_name">Texture Filter</string>
|
||||
<string name="texture_filter_description">Enhances the visuals of applications by applying a filter to textures. The supported filters are Anime4K Ultrafast, Bicubic, ScaleForce, xBRZ freescale, and MMPX.</string>
|
||||
<string name="antialiasing_filter_name">Antialiasing Filter</string>
|
||||
<string name="antialiasing_filter_description">Reduces the amount of aliasing, resulting in smoother edges. FXAA is extremely lightweight but more aggressive and lower quality. SMAA is heavier but is higher quality and more selective with the edges it smooths.</string>
|
||||
<string name="output_scaling_name">Output Scaling</string>
|
||||
<string name="output_scaling_description">The method by which the game output is scaled to the screen. Nearest doesn\'t smooth visuals but causes uneven pixels at non-integer ratios. Bilinear smooths visuals but may cause aliasing when downscaling. Adaptive uses bilinear for upscaling, but uses area sampling to downscale without creating aliasing. FSR 1 is an upscaler which allows sharpening and allows better visuals without increasing the internal resolution. This should be used with antialiasing and a minimum internal resolution of 2x Native. Sharp Bilinear looks similar to nearest but is slightly smoothed to prevent uneven pixels at non-integer ratios.</string>
|
||||
<string name="fsr_sharpness_name">FSR Sharpness</string>
|
||||
<string name="fsr_sharpness_description">Specifies the strength of the sharpening pass when using FSR</string>
|
||||
<string name="delay_render_thread">Delay Game Render Thread</string>
|
||||
<string name="delay_render_thread_description">Delay the game render thread when it submits data to the GPU. Helps with performance issues in the (very few) applications with dynamic framerates.</string>
|
||||
<string name="advanced">Advanced</string>
|
||||
|
|
@ -764,6 +770,18 @@
|
|||
<string name="xbrz">xBRZ</string>
|
||||
<string name="mmpx">MMPX</string>
|
||||
|
||||
<!-- Output scaling names -->
|
||||
<string name="nearest">Nearest</string>
|
||||
<string name="bilinear">Bilinear</string>
|
||||
<string name="adaptive">Adaptive</string>
|
||||
<string name="fsr">AMD FSR 1</string>
|
||||
<string name="sharpbilinear">Sharp Bilinear</string>
|
||||
|
||||
<!-- Antialiasing names -->
|
||||
<!-- None is already defined -->
|
||||
<string name="fxaa">FXAA</string>
|
||||
<string name="smaa">SMAA</string>
|
||||
|
||||
<!-- Texture Sampling names -->
|
||||
<string name="game_controlled">Game Controlled</string>
|
||||
<string name="nearest_neighbor">Nearest Neighbor</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue