diff options
| author | JosJuice <josjuice@gmail.com> | 2017-12-17 13:50:47 +0100 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2017-12-18 21:53:06 +0100 |
| commit | acee8b1e234d0d21a25a971bb499d878fec1ef04 (patch) | |
| tree | 3a62bfefa457ce28877f79e2371b4c546d550293 /Source/Android/app/src | |
| parent | ba01642dc78a44126b334d7ff4d3ceae5fec7902 (diff) | |
Update Android GUI settings for Hybrid XFB
Diffstat (limited to 'Source/Android/app/src')
5 files changed, 11 insertions, 81 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsAdapter.java index f27210111a..172bf5bf30 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsAdapter.java @@ -262,10 +262,6 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde { putVideoBackendSetting(which); } - else if (scSetting.getKey().equals(SettingsFile.KEY_XFB_METHOD)) - { - putXfbSetting(which); - } else if (scSetting.getKey().equals(SettingsFile.KEY_UBERSHADER_MODE)) { putUberShaderModeSetting(which); @@ -406,33 +402,6 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde mView.putSetting(gfxBackend); } - public void putXfbSetting(int which) - { - BooleanSetting xfbEnable = null; - BooleanSetting xfbReal = null; - - switch (which) - { - case 0: - xfbEnable = new BooleanSetting(SettingsFile.KEY_XFB, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, false); - xfbReal = new BooleanSetting(SettingsFile.KEY_XFB_REAL, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, false); - break; - - case 1: - xfbEnable = new BooleanSetting(SettingsFile.KEY_XFB, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, true); - xfbReal = new BooleanSetting(SettingsFile.KEY_XFB_REAL, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, false); - break; - - case 2: - xfbEnable = new BooleanSetting(SettingsFile.KEY_XFB, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, true); - xfbReal = new BooleanSetting(SettingsFile.KEY_XFB_REAL, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, true); - break; - } - - mView.putSetting(xfbEnable); - mView.putSetting(xfbReal); - } - public void putUberShaderModeSetting(int which) { BooleanSetting disableSpecializedShaders = null; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsFragmentPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsFragmentPresenter.java index dd10a3c296..ef32808a8c 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsFragmentPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsFragmentPresenter.java @@ -317,14 +317,14 @@ public final class SettingsFragmentPresenter { boolean skipEFBValue = getInvertedBooleanValue(SettingsFile.SETTINGS_GFX, SettingsFile.SECTION_GFX_HACKS, SettingsFile.KEY_SKIP_EFB, false); boolean ignoreFormatValue = getInvertedBooleanValue(SettingsFile.SETTINGS_GFX, SettingsFile.SECTION_GFX_HACKS, SettingsFile.KEY_IGNORE_FORMAT, true); - int xfbValue = getXfbValue(); BooleanSetting skipEFB = new BooleanSetting(SettingsFile.KEY_SKIP_EFB, SettingsFile.SECTION_GFX_HACKS, SettingsFile.SETTINGS_GFX, skipEFBValue); BooleanSetting ignoreFormat = new BooleanSetting(SettingsFile.KEY_IGNORE_FORMAT, SettingsFile.SECTION_GFX_HACKS, SettingsFile.SETTINGS_GFX, ignoreFormatValue); Setting efbToTexture = mSettings.get(SettingsFile.SETTINGS_GFX).get(SettingsFile.SECTION_GFX_HACKS).getSetting(SettingsFile.KEY_EFB_TEXTURE); Setting texCacheAccuracy = mSettings.get(SettingsFile.SETTINGS_GFX).get(SettingsFile.SECTION_GFX_SETTINGS).getSetting(SettingsFile.KEY_TEXCACHE_ACCURACY); Setting gpuTextureDecoding = mSettings.get(SettingsFile.SETTINGS_GFX).get(SettingsFile.SECTION_GFX_SETTINGS).getSetting(SettingsFile.KEY_GPU_TEXTURE_DECODING); - IntSetting xfb = new IntSetting(SettingsFile.KEY_XFB, SettingsFile.SECTION_GFX_HACKS, SettingsFile.SETTINGS_GFX, xfbValue); + Setting xfbToTexture = mSettings.get(SettingsFile.SETTINGS_GFX).get(SettingsFile.SECTION_GFX_HACKS).getSetting(SettingsFile.KEY_XFB_TEXTURE); + Setting immediateXfb = mSettings.get(SettingsFile.SETTINGS_GFX).get(SettingsFile.SECTION_GFX_HACKS).getSetting(SettingsFile.KEY_IMMEDIATE_XFB); Setting fastDepth = mSettings.get(SettingsFile.SETTINGS_GFX).get(SettingsFile.SECTION_GFX_HACKS).getSetting(SettingsFile.KEY_FAST_DEPTH); Setting aspectRatio = mSettings.get(SettingsFile.SETTINGS_GFX).get(SettingsFile.SECTION_GFX_SETTINGS).getSetting(SettingsFile.KEY_ASPECT_RATIO); @@ -338,7 +338,8 @@ public final class SettingsFragmentPresenter sl.add(new CheckBoxSetting(SettingsFile.KEY_GPU_TEXTURE_DECODING, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, R.string.gpu_texture_decoding, R.string.gpu_texture_decoding_descrip, false, gpuTextureDecoding)); sl.add(new HeaderSetting(null, null, R.string.external_frame_buffer, 0)); - sl.add(new SingleChoiceSetting(SettingsFile.KEY_XFB_METHOD, SettingsFile.SECTION_GFX_HACKS, SettingsFile.SETTINGS_GFX, R.string.external_frame_buffer, R.string.external_frame_buffer_descrip, R.array.externalFrameBufferEntries, R.array.externalFrameBufferValues, 0, xfb)); + sl.add(new CheckBoxSetting(SettingsFile.KEY_XFB_TEXTURE, SettingsFile.SECTION_GFX_HACKS, SettingsFile.SETTINGS_GFX, R.string.xfb_copy_method, R.string.xfb_copy_method_descrip, true, xfbToTexture)); + sl.add(new CheckBoxSetting(SettingsFile.KEY_IMMEDIATE_XFB, SettingsFile.SECTION_GFX_HACKS, SettingsFile.SETTINGS_GFX, R.string.immediate_xfb, R.string.immediate_xfb_descrip, false, immediateXfb)); sl.add(new HeaderSetting(null, null, R.string.other, 0)); sl.add(new CheckBoxSetting(SettingsFile.KEY_FAST_DEPTH, SettingsFile.SECTION_GFX_HACKS, SettingsFile.SETTINGS_GFX, R.string.fast_depth_calculation, R.string.fast_depth_calculation_descrip, true, fastDepth)); @@ -798,36 +799,6 @@ public final class SettingsFragmentPresenter return videoBackendValue; } - private int getXfbValue() - { - int xfbValue; - - try - { - boolean usingXFB = ((BooleanSetting) mSettings.get(SettingsFile.SETTINGS_GFX).get(SettingsFile.SECTION_GFX_SETTINGS).getSetting(SettingsFile.KEY_XFB)).getValue(); - boolean usingRealXFB = ((BooleanSetting) mSettings.get(SettingsFile.SETTINGS_GFX).get(SettingsFile.SECTION_GFX_SETTINGS).getSetting(SettingsFile.KEY_XFB_REAL)).getValue(); - - if (!usingXFB) - { - xfbValue = 0; - } - else if (!usingRealXFB) - { - xfbValue = 1; - } - else - { - xfbValue = 2; - } - } - catch (NullPointerException ex) - { - xfbValue = 0; - } - - return xfbValue; - } - private int getUberShaderModeValue() { int uberShaderModeValue = 0; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java index a5656fcd89..8a89cc83b5 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java @@ -103,11 +103,10 @@ public final class SettingsFile public static final String KEY_EFB_TEXTURE = "EFBToTextureEnable"; public static final String KEY_TEXCACHE_ACCURACY = "SafeTextureCacheColorSamples"; public static final String KEY_GPU_TEXTURE_DECODING = "EnableGPUTextureDecoding"; - public static final String KEY_XFB = "UseXFB"; - public static final String KEY_XFB_REAL = "UseRealXFB"; + public static final String KEY_XFB_TEXTURE = "XFBToTextureEnable"; + public static final String KEY_IMMEDIATE_XFB = "ImmediateXFBEnable"; public static final String KEY_FAST_DEPTH = "FastDepthCalc"; public static final String KEY_ASPECT_RATIO = "AspectRatio"; - public static final String KEY_UBERSHADER_MODE = "UberShaderMode"; public static final String KEY_DISABLE_SPECIALIZED_SHADERS = "DisableSpecializedShaders"; public static final String KEY_BACKGROUND_SHADER_COMPILING = "BackgroundShaderCompiling"; @@ -267,7 +266,7 @@ public final class SettingsFile // Internal only, not actually found in settings file. public static final String KEY_VIDEO_BACKEND_INDEX = "VideoBackendIndex"; - public static final String KEY_XFB_METHOD = "XFBMethod"; + public static final String KEY_UBERSHADER_MODE = "UberShaderMode"; private SettingsFile() { diff --git a/Source/Android/app/src/main/res/values/arrays.xml b/Source/Android/app/src/main/res/values/arrays.xml index 754941dd2c..637c5cca50 100644 --- a/Source/Android/app/src/main/res/values/arrays.xml +++ b/Source/Android/app/src/main/res/values/arrays.xml @@ -91,18 +91,6 @@ <item>0</item> </integer-array> - <!-- External Frame Buffer Preference --> - <string-array name="externalFrameBufferEntries" translatable="false"> - <item>Disabled</item> - <item>Virtual</item> - <item>Real</item> - </string-array> - <integer-array name="externalFrameBufferValues" translatable="false"> - <item>0</item> - <item>1</item> - <item>2</item> - </integer-array> - <!-- Ubershader Mode Preference --> <string-array name="uberShaderModeEntries" translatable="false"> <item>Disabled</item> diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 9f51d02edd..7405f0619d 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -174,7 +174,10 @@ <string name="gpu_texture_decoding">GPU Texture Decoding</string> <string name="gpu_texture_decoding_descrip">Decodes textures on the GPU using compute shaders where supported. May improve performance in some scenarios.</string> <string name="external_frame_buffer">External Frame Buffer</string> - <string name="external_frame_buffer_descrip">Determines how the XFB will be emulated.</string> + <string name="xfb_copy_method">Store XFB Copies to Texture Only</string> + <string name="xfb_copy_method_descrip">Stores XFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects in a small number of games that need to readback from memory. If unsure, leave this checked.</string> + <string name="immediate_xfb">Immediately Present XFB</string> + <string name="immediate_xfb_descrip">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.</string> <string name="disable_destination_alpha">Disable Destination Alpha</string> <string name="disable_destination_alpha_descrip">Disables emulation of a hardware feature called destination alpha, which is used in many games for various effects.</string> <string name="fast_depth_calculation">Fast Depth Calculation</string> |
