Android: Expose texture filtering options

This commit is contained in:
Charles Lombardo 2023-01-17 02:23:12 -05:00
parent 23331e4367
commit 96c8a7ee1f
4 changed files with 54 additions and 3 deletions

View File

@ -61,6 +61,9 @@ public enum IntSetting implements AbstractIntSetting
GFX_SHADER_COMPILATION_MODE(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, GFX_SHADER_COMPILATION_MODE(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS,
"ShaderCompilationMode", 0), "ShaderCompilationMode", 0),
GFX_ENHANCE_FORCE_TEXTURE_FILTERING(Settings.FILE_GFX, Settings.SECTION_GFX_ENHANCEMENTS,
"ForceTextureFiltering", 0),
GFX_ENHANCE_MAX_ANISOTROPY(Settings.FILE_GFX, Settings.SECTION_GFX_ENHANCEMENTS, "MaxAnisotropy", GFX_ENHANCE_MAX_ANISOTROPY(Settings.FILE_GFX, Settings.SECTION_GFX_ENHANCEMENTS, "MaxAnisotropy",
0), 0),

View File

@ -806,6 +806,37 @@ public final class SettingsFragmentPresenter
sl.add(new SingleChoiceSetting(mContext, IntSetting.GFX_ENHANCE_MAX_ANISOTROPY, sl.add(new SingleChoiceSetting(mContext, IntSetting.GFX_ENHANCE_MAX_ANISOTROPY,
R.string.anisotropic_filtering, R.string.anisotropic_filtering_description, R.string.anisotropic_filtering, R.string.anisotropic_filtering_description,
R.array.anisotropicFilteringEntries, R.array.anisotropicFilteringValues)); R.array.anisotropicFilteringEntries, R.array.anisotropicFilteringValues));
AbstractIntSetting filteringSetting = new AbstractIntSetting()
{
@Override public int getInt(Settings settings)
{
return IntSetting.GFX_ENHANCE_FORCE_TEXTURE_FILTERING.getInt(settings);
}
@Override public void setInt(Settings settings, int newValue)
{
BooleanSetting.GFX_ENHANCE_FORCE_FILTERING.setBoolean(settings, (newValue > 0));
IntSetting.GFX_ENHANCE_FORCE_TEXTURE_FILTERING.setInt(settings, newValue);
}
@Override public boolean isOverridden(Settings settings)
{
return IntSetting.GFX_ENHANCE_FORCE_TEXTURE_FILTERING.isOverridden(settings);
}
@Override public boolean isRuntimeEditable()
{
return IntSetting.GFX_ENHANCE_FORCE_TEXTURE_FILTERING.isRuntimeEditable();
}
@Override public boolean delete(Settings settings)
{
return IntSetting.GFX_ENHANCE_FORCE_TEXTURE_FILTERING.delete(settings);
}
};
sl.add(new SingleChoiceSetting(mContext, filteringSetting, R.string.texture_filtering,
R.string.texture_filtering_description, R.array.textureFilteringEntries,
R.array.textureFilteringValues));
int stereoModeValue = IntSetting.GFX_STEREO_MODE.getInt(mSettings); int stereoModeValue = IntSetting.GFX_STEREO_MODE.getInt(mSettings);
final int anaglyphMode = 3; final int anaglyphMode = 3;
@ -827,8 +858,6 @@ public final class SettingsFragmentPresenter
R.string.scaled_efb_copy, R.string.scaled_efb_copy_description)); R.string.scaled_efb_copy, R.string.scaled_efb_copy_description));
sl.add(new SwitchSetting(mContext, BooleanSetting.GFX_ENABLE_PIXEL_LIGHTING, sl.add(new SwitchSetting(mContext, BooleanSetting.GFX_ENABLE_PIXEL_LIGHTING,
R.string.per_pixel_lighting, R.string.per_pixel_lighting_description)); R.string.per_pixel_lighting, R.string.per_pixel_lighting_description));
sl.add(new SwitchSetting(mContext, BooleanSetting.GFX_ENHANCE_FORCE_FILTERING,
R.string.force_texture_filtering, R.string.force_texture_filtering_description));
sl.add(new SwitchSetting(mContext, BooleanSetting.GFX_ENHANCE_FORCE_TRUE_COLOR, sl.add(new SwitchSetting(mContext, BooleanSetting.GFX_ENHANCE_FORCE_TRUE_COLOR,
R.string.force_24bit_color, R.string.force_24bit_color_description)); R.string.force_24bit_color, R.string.force_24bit_color_description));
sl.add(new SwitchSetting(mContext, BooleanSetting.GFX_DISABLE_FOG, R.string.disable_fog, sl.add(new SwitchSetting(mContext, BooleanSetting.GFX_DISABLE_FOG, R.string.disable_fog,

View File

@ -293,7 +293,7 @@
<!-- Anisotropic Filtering Preference --> <!-- Anisotropic Filtering Preference -->
<string-array name="anisotropicFilteringEntries"> <string-array name="anisotropicFilteringEntries">
<item>@string/multiple_one</item> <item>@string/filtering_default</item>
<item>@string/multiple_two</item> <item>@string/multiple_two</item>
<item>@string/multiple_four</item> <item>@string/multiple_four</item>
<item>@string/multiple_eight</item> <item>@string/multiple_eight</item>
@ -307,6 +307,18 @@
<item>4</item> <item>4</item>
</integer-array> </integer-array>
<!-- Texture Filtering Preference -->
<string-array name="textureFilteringEntries">
<item>@string/filtering_default</item>
<item>@string/filtering_nearest</item>
<item>@string/filtering_linear</item>
</string-array>
<integer-array name="textureFilteringValues">
<item>0</item>
<item>1</item>
<item>2</item>
</integer-array>
<!-- Stereoscopy Preference --> <!-- Stereoscopy Preference -->
<string-array name="stereoscopyEntries"> <string-array name="stereoscopyEntries">
<item>@string/stereoscopy_off</item> <item>@string/stereoscopy_off</item>

View File

@ -252,6 +252,8 @@
<string name="FSAA_description">Reduces the amount of aliasing caused by rasterizing 3D graphics. This makes the rendered picture look less blocky. Heavily decreases emulation speed and sometimes causes issues.</string> <string name="FSAA_description">Reduces the amount of aliasing caused by rasterizing 3D graphics. This makes the rendered picture look less blocky. Heavily decreases emulation speed and sometimes causes issues.</string>
<string name="anisotropic_filtering">Anisotropic Filtering</string> <string name="anisotropic_filtering">Anisotropic Filtering</string>
<string name="anisotropic_filtering_description">Enhances visual quality of textures that are at oblique viewing angles. Might cause issues in a small number of games.</string> <string name="anisotropic_filtering_description">Enhances visual quality of textures that are at oblique viewing angles. Might cause issues in a small number of games.</string>
<string name="texture_filtering">Texture Filtering</string>
<string name="texture_filtering_description">Overrides the texture scaling filter selected by the game. Any option except \'Default\' will alter the look of the game\'s textures and might cause issues in a small number of games.</string>
<string name="post_processing_shader">Post-Processing Effect</string> <string name="post_processing_shader">Post-Processing Effect</string>
<string name="post_processing_shader_description">Apply a post-processing effect after finishing a frame</string> <string name="post_processing_shader_description">Apply a post-processing effect after finishing a frame</string>
<string name="postprocessing_shader">Post Processing Shader</string> <string name="postprocessing_shader">Post Processing Shader</string>
@ -753,6 +755,11 @@ It can efficiently compress both junk data and encrypted Wii data.
<string name="multiple_eight">8x</string> <string name="multiple_eight">8x</string>
<string name="multiple_sixteen">16x</string> <string name="multiple_sixteen">16x</string>
<!-- Texture Filtering Preference -->
<string name="filtering_default">Default</string>
<string name="filtering_nearest">Force Nearest</string>
<string name="filtering_linear">Force Linear</string>
<!-- Stereoscopy Preference --> <!-- Stereoscopy Preference -->
<string name="stereoscopy_off">Off</string> <string name="stereoscopy_off">Off</string>
<string name="stereoscopy_side_by_side">Side-by-Side</string> <string name="stereoscopy_side_by_side">Side-by-Side</string>