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 480f69937f..ac3f86eb8a 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 @@ -129,18 +129,37 @@ public enum BooleanSetting implements AbstractBooleanSetting SYSCONF_SCREENSAVER(Settings.FILE_SYSCONF, "IPL", "SSV", false), SYSCONF_WIDESCREEN(Settings.FILE_SYSCONF, "IPL", "AR", true), + SYSCONF_PROGRESSIVE_SCAN(Settings.FILE_SYSCONF, "IPL", "PGS", true), SYSCONF_PAL60(Settings.FILE_SYSCONF, "IPL", "E60", true), SYSCONF_WIIMOTE_MOTOR(Settings.FILE_SYSCONF, "BT", "MOT", true), GFX_WIDESCREEN_HACK(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "wideScreenHack", false), + GFX_CROP(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "Crop", false), GFX_SHOW_FPS(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "ShowFPS", false), + GFX_OVERLAY_STATS(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "OverlayStats", false), + GFX_DUMP_TEXTURES(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "DumpTextures", false), + GFX_DUMP_MIP_TEXTURES(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "DumpMipTextures", false), + GFX_DUMP_BASE_TEXTURES(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "DumpBaseTextures", + false), + GFX_HIRES_TEXTURES(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "HiresTextures", false), + GFX_CACHE_HIRES_TEXTURES(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "CacheHiresTextures", + false), + GFX_DUMP_EFB_TARGET(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "DumpEFBTarget", false), + GFX_DUMP_XFB_TARGET(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "DumpXFBTarget", false), + GFX_INTERNAL_RESOLUTION_FRAME_DUMPS(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, + "InternalResolutionFrameDumps", false), GFX_ENABLE_GPU_TEXTURE_DECODING(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "EnableGPUTextureDecoding", false), GFX_ENABLE_PIXEL_LIGHTING(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "EnablePixelLighting", false), GFX_FAST_DEPTH_CALC(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "FastDepthCalc", true), + GFX_TEXFMT_OVERLAY_ENABLE(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "TexFmtOverlayEnable", + false), + GFX_ENABLE_WIREFRAME(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "WireFrame", false), GFX_DISABLE_FOG(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "DisableFog", false), + GFX_ENABLE_VALIDATION_LAYER(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, + "EnableValidationLayer", false), GFX_BACKEND_MULTITHREADING(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, "BackendMultithreading", false), GFX_WAIT_FOR_SHADERS_BEFORE_STARTING(Settings.FILE_GFX, Settings.SECTION_GFX_SETTINGS, @@ -161,11 +180,15 @@ public enum BooleanSetting implements AbstractBooleanSetting GFX_HACK_EFB_ACCESS_ENABLE(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "EFBAccessEnable", true), + GFX_HACK_EFB_DEFER_INVALIDATION(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, + "EFBAccessDeferInvalidation", false), 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, "XFBToTextureEnable", true), + GFX_HACK_DISABLE_COPY_TO_VRAM(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "DisableCopyToVRAM", + false), GFX_HACK_DEFER_EFB_COPIES(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "DeferEFBCopies", true), GFX_HACK_IMMEDIATE_XFB(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "ImmediateXFBEnable", false), diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java index 0e15471591..aa5d4216a0 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/MenuTag.java @@ -16,14 +16,15 @@ public enum MenuTag CONFIG_WII("config_wii"), CONFIG_ADVANCED("config_advanced"), CONFIG_LOG("config_log"), - WIIMOTE("wiimote"), - WIIMOTE_EXTENSION("wiimote_extension"), - GCPAD_TYPE("gc_pad_type"), - GRAPHICS("graphics"), - HACKS("hacks"), DEBUG("debug"), + GRAPHICS("graphics"), ENHANCEMENTS("enhancements"), STEREOSCOPY("stereoscopy"), + HACKS("hacks"), + ADVANCED_GRAPHICS("advanced_graphics"), + GCPAD_TYPE("gc_pad_type"), + WIIMOTE("wiimote"), + WIIMOTE_EXTENSION("wiimote_extension"), GCPAD_1("gcpad", 0), GCPAD_2("gcpad", 1), GCPAD_3("gcpad", 2), diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java index 3e7ce50b59..6173d83599 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java @@ -46,15 +46,16 @@ public final class SettingsFragment extends Fragment implements SettingsFragment titles.put(MenuTag.CONFIG_GAME_CUBE, R.string.gamecube_submenu); titles.put(MenuTag.CONFIG_WII, R.string.wii_submenu); titles.put(MenuTag.CONFIG_ADVANCED, R.string.advanced_submenu); - titles.put(MenuTag.WIIMOTE, R.string.wiimote_settings); - titles.put(MenuTag.WIIMOTE_EXTENSION, R.string.wiimote_extensions); - titles.put(MenuTag.GCPAD_TYPE, R.string.gcpad_settings); - titles.put(MenuTag.GRAPHICS, R.string.graphics_settings); - titles.put(MenuTag.HACKS, R.string.hacks_submenu); - titles.put(MenuTag.CONFIG_LOG, R.string.log_submenu); titles.put(MenuTag.DEBUG, R.string.debug_submenu); + titles.put(MenuTag.GRAPHICS, R.string.graphics_settings); titles.put(MenuTag.ENHANCEMENTS, R.string.enhancements_submenu); titles.put(MenuTag.STEREOSCOPY, R.string.stereoscopy_submenu); + titles.put(MenuTag.HACKS, R.string.hacks_submenu); + titles.put(MenuTag.ADVANCED_GRAPHICS, R.string.advanced_graphics_submenu); + titles.put(MenuTag.CONFIG_LOG, R.string.log_submenu); + titles.put(MenuTag.GCPAD_TYPE, R.string.gcpad_settings); + titles.put(MenuTag.WIIMOTE, R.string.wiimote_settings); + titles.put(MenuTag.WIIMOTE_EXTENSION, R.string.wiimote_extensions); titles.put(MenuTag.GCPAD_1, R.string.controller_0); titles.put(MenuTag.GCPAD_2, R.string.controller_1); titles.put(MenuTag.GCPAD_3, R.string.controller_2); 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 d91faa775e..dfbe629c30 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 @@ -181,10 +181,18 @@ public final class SettingsFragmentPresenter addEnhanceSettings(sl); break; + case STEREOSCOPY: + addStereoSettings(sl); + break; + case HACKS: addHackSettings(sl); break; + case ADVANCED_GRAPHICS: + addAdvancedGraphicsSettings(sl); + break; + case CONFIG_LOG: addLogConfigurationSettings(sl); break; @@ -214,10 +222,6 @@ public final class SettingsFragmentPresenter addExtensionTypeSettings(sl, mControllerNumber, mControllerType); break; - case STEREOSCOPY: - addStereoSettings(sl); - break; - default: throw new UnsupportedOperationException("Unimplemented menu"); } @@ -610,9 +614,11 @@ public final class SettingsFragmentPresenter sl.add(new SingleChoiceSetting(mContext, IntSetting.GFX_ASPECT_RATIO, R.string.aspect_ratio, 0, R.array.aspectRatioEntries, R.array.aspectRatioValues)); - sl.add(new HeaderSetting(mContext, R.string.graphics_enhancements_and_hacks, 0)); + sl.add(new HeaderSetting(mContext, R.string.graphics_more_settings, 0)); sl.add(new SubmenuSetting(mContext, R.string.enhancements_submenu, MenuTag.ENHANCEMENTS)); sl.add(new SubmenuSetting(mContext, R.string.hacks_submenu, MenuTag.HACKS)); + sl.add(new SubmenuSetting(mContext, R.string.advanced_graphics_submenu, + MenuTag.ADVANCED_GRAPHICS)); } private void addEnhanceSettings(ArrayList sl) @@ -658,14 +664,10 @@ public final class SettingsFragmentPresenter R.string.arbitrary_mipmap_detection, R.string.arbitrary_mipmap_detection_description)); sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_WIDESCREEN_HACK, R.string.wide_screen_hack, R.string.wide_screen_hack_description)); - sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_BACKEND_MULTITHREADING, - R.string.backend_multithreading, R.string.backend_multithreading_description)); - /* - Check if we support stereo - If we support desktop GL then we must support at least OpenGL 3.2 - If we only support OpenGLES then we need both OpenGLES 3.1 and AEP - */ + // Check if we support stereo + // If we support desktop GL then we must support at least OpenGL 3.2 + // If we only support OpenGLES then we need both OpenGLES 3.1 and AEP EGLHelper helper = new EGLHelper(EGLHelper.EGL_OPENGL_ES2_BIT); if ((helper.supportsOpenGL() && helper.GetVersion() >= 320) || @@ -714,6 +716,49 @@ public final class SettingsFragmentPresenter R.string.texture_cache_to_state, R.string.texture_cache_to_state_description)); } + private void addAdvancedGraphicsSettings(ArrayList sl) + { + sl.add(new HeaderSetting(mContext, R.string.custom_textures, 0)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_HIRES_TEXTURES, + R.string.load_custom_texture, R.string.load_custom_texture_description)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_CACHE_HIRES_TEXTURES, + R.string.cache_custom_texture, R.string.cache_custom_texture_description)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_DUMP_TEXTURES, + R.string.dump_texture, R.string.dump_texture_description)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_DUMP_BASE_TEXTURES, + R.string.dump_base_texture, R.string.dump_base_texture_description)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_DUMP_MIP_TEXTURES, + R.string.dump_mip_texture, R.string.dump_mip_texture_description)); + + sl.add(new HeaderSetting(mContext, R.string.misc, 0)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_CROP, R.string.crop, + R.string.crop_description)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.SYSCONF_PROGRESSIVE_SCAN, + R.string.progressive_scan, 0)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_BACKEND_MULTITHREADING, + R.string.backend_multithreading, R.string.backend_multithreading_description)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_HACK_EFB_DEFER_INVALIDATION, + R.string.defer_efb_invalidation, R.string.defer_efb_invalidation_description)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_INTERNAL_RESOLUTION_FRAME_DUMPS, + R.string.internal_resolution_dumps, R.string.internal_resolution_dumps_description)); + + sl.add(new HeaderSetting(mContext, R.string.debugging, 0)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_ENABLE_WIREFRAME, + R.string.wireframe, R.string.leave_this_unchecked)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_OVERLAY_STATS, + R.string.show_stats, R.string.leave_this_unchecked)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_TEXFMT_OVERLAY_ENABLE, + R.string.texture_format, R.string.leave_this_unchecked)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_ENABLE_VALIDATION_LAYER, + R.string.validation_layer, R.string.leave_this_unchecked)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_DUMP_EFB_TARGET, + R.string.dump_efb, R.string.leave_this_unchecked)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_DUMP_XFB_TARGET, + R.string.dump_xfb, R.string.leave_this_unchecked)); + sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_HACK_DISABLE_COPY_TO_VRAM, + R.string.disable_vram_copies, R.string.leave_this_unchecked)); + } + private void addLogConfigurationSettings(ArrayList sl) { sl.add(new CheckBoxSetting(mContext, BooleanSetting.LOGGER_WRITE_TO_FILE, R.string.log_to_file, diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 581e2bccfb..c6b29b6784 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -201,7 +201,7 @@ General - Enhancements & Hacks + More Video Backend @@ -246,8 +246,6 @@ Control the distance of the convergence plane, this is the distance at which objects will appear to be in front of the screen.\nA higher value creates stronger out-of-screen effects while a lower value is more comfortable. Swap Eyes Swap the left and right eye, mostly useful if you want to view side-by-side cross-eyed. - Backend Multithreading - Enables graphics backend multithreading (Vulkan only). May affect performance. If unsure, leave unchecked. Hacks Embedded Frame Buffer @@ -285,6 +283,38 @@ Compile Shaders Before Starting This causes a delay when launching games, but will reduce stuttering early on. + Advanced + Custom Textures + Load Custom Textures + Loads custom textures from User/Load/Textures/<game_id>/ and User/Load/DynamicInputTextures/<game_id>/. + Prefetch Custom Textures + Caches custom textures to system RAM on startup. This can require exponentially more RAM but fixes possible stuttering. + Dump Textures + Dumps decoded game textures based on the other flags to User/Dump/Textures/<game_id>/. If unsure, leave this unchecked. + Dump Base Textures + Whether to dump mipmapped game textures to User/Dump/Textures/<game_id>/. + Dump Mip Maps + Whether to dump base game textures to User/Dump/Textures/<game_id>/. + Misc + Crop + Crops the picture from its native aspect ratio to 4:3 or 16:9. If unsure, leave this unchecked. + Enable Progressive Scan + Backend Multithreading + Enables graphics backend multithreading (Vulkan only). May affect performance. If unsure, leave this unchecked. + Defer EFB Cache Invalidation + Defers invalidation of the EFB access cache until a GPU synchronization command is executed. May improve performance in some games at the cost of stability. If unsure, leave this unchecked. + Dump Frames at Internal Resolution + Creates frame dumps and screenshots at the internal resolution of the renderer, rather than the size of the window it is displayed within. If the aspect ratio is widescreen, the output image will be scaled horizontally to preserve the vertical resolution. + Debugging + Enable Wireframe + Show Statistics + Texture Format Overlay + Enable API Validation Layers + Dump EFB Target + Dump XFB Target + Disable EFB VRAM Copies + If unsure, leave this unchecked. + Advanced CPU Core