From e2c8b3a317dd8bdfe990ebfd84b5e696266c2aee Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 19 Mar 2021 20:47:43 +0100 Subject: [PATCH] Android: Add some missing settings to Hacks section of Graphics This brings the available settings in the Hacks section in line with DolphinQt. --- .../features/settings/model/BooleanSetting.java | 4 ++++ .../settings/ui/SettingsFragmentPresenter.java | 6 ++++++ Source/Android/app/src/main/res/values/strings.xml | 10 +++++++--- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java index 60f0a1c9d1..d4bb8accce 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java @@ -140,6 +140,8 @@ public enum BooleanSetting implements AbstractBooleanSetting "BackendMultithreading", false), GFX_WAIT_FOR_SHADERS_BEFORE_STARTING(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "WaitForShadersBeforeStarting", false), + GFX_SAVE_TEXTURE_CACHE_TO_STATE(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, + "SaveTextureCacheToState", true), GFX_ENHANCE_FORCE_FILTERING(Settings.FILE_GFX, Settings.SECTION_GFX_ENHANCEMENTS, "ForceFiltering", false), @@ -154,6 +156,7 @@ public enum BooleanSetting implements AbstractBooleanSetting GFX_HACK_EFB_ACCESS_ENABLE(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "EFBAccessEnable", true), + GFX_HACK_BBOX_ENABLE(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "BBoxEnable", false), GFX_HACK_SKIP_EFB_COPY_TO_RAM(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "EFBToTextureEnable", true), GFX_HACK_SKIP_XFB_COPY_TO_RAM(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, @@ -166,6 +169,7 @@ public enum BooleanSetting implements AbstractBooleanSetting GFX_HACK_COPY_EFB_SCALED(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "EFBScaledCopy", true), GFX_HACK_EFB_EMULATE_FORMAT_CHANGES(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "EFBEmulateFormatChanges", false), + GFX_HACK_VERTEX_ROUDING(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "VertexRounding", false), LOGGER_WRITE_TO_FILE(Settings.FILE_LOGGER, Settings.SECTION_LOGGER_OPTIONS, "WriteToFile", false), diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java index 5cfdcf53bf..917c975ac4 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java @@ -658,6 +658,12 @@ public final class SettingsFragmentPresenter sl.add(new HeaderSetting(R.string.other, 0)); sl.add(new CheckBoxSetting(BooleanSetting.GFX_FAST_DEPTH_CALC, R.string.fast_depth_calculation, R.string.fast_depth_calculation_description)); + sl.add(new InvertedCheckBoxSetting(BooleanSetting.GFX_HACK_BBOX_ENABLE, R.string.disable_bbox, + R.string.disable_bbox_description)); + sl.add(new CheckBoxSetting(BooleanSetting.GFX_HACK_VERTEX_ROUDING, R.string.vertex_rounding, + R.string.vertex_rounding_description)); + sl.add(new CheckBoxSetting(BooleanSetting.GFX_SAVE_TEXTURE_CACHE_TO_STATE, + R.string.texture_cache_to_state, R.string.texture_cache_to_state_description)); } private void addLogConfigurationSettings(ArrayList sl) diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 6a53b7ce3c..004a29731a 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -265,10 +265,14 @@ Displays the XFB copies as soon as they are created, without waiting for scanout. Causes graphical defects in some games but reduces latency. If unsure, leave this unchecked. Skip Presenting Duplicate Frames Skips presentation of duplicate frames. This may improve performance on low-end devices, while making frame pacing less consistent. If unsure, leave this checked. - Disable Destination Alpha - Disables emulation of a hardware feature called destination alpha, which is used in many games for various effects. Fast Depth Calculation - Uses a less accurate algorithm to calculate depth values. + Uses a less accurate algorithm to calculate depth values. Causes issues in a few games, but can result in a decent speed increase depending on the game and/or GPU. If unsure, leave this checked. + Disable Bounding Box + Disables bounding box emulation. This may improve GPU performance significantly, but some games will break. If unsure, leave this checked. + Vertex Rounding + Rounds 2D vertices to whole pixels. Fixes graphical problems in some games at higher internal resolutions. This setting has no effect when native internal resolution is used. If unsure, leave this unchecked. + Save Texture Cache to State + Includes the contents of the embedded frame buffer (EFB) and upscaled EFB copies in save states. Fixes missing and/or non-upscaled textures/objects when loading states at the cost of additional save/load time. Aspect Ratio Select what aspect ratio to use when rendering Shader Compilation Mode