From e52c2ac3375571fe7dc98d07687c3a69d9012dc1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 20 Aug 2013 20:28:48 -0400 Subject: [PATCH] [Android] Migrate the "Draw Onscreen Controls" preference to the video settings. --- Source/Android/res/values-ja/strings.xml | 3 +-- Source/Android/res/values/strings.xml | 4 ++-- Source/Android/res/xml/video_prefs.xml | 5 +++++ .../dolphinemu/inputconfig/InputConfigFragment.java | 1 - .../dolphinemu/dolphinemu/settings/UserPreferences.java | 8 +++++++- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Source/Android/res/values-ja/strings.xml b/Source/Android/res/values-ja/strings.xml index f84e12359c..8b58d9abaf 100644 --- a/Source/Android/res/values-ja/strings.xml +++ b/Source/Android/res/values-ja/strings.xml @@ -30,7 +30,6 @@ クリックされたファイル: - 画面上のコントロールを描画 Aボタン Bボタン スタートボタン @@ -66,12 +65,12 @@ 使用するエミュレーションコア デュアルコア 有効/無効 - ビデオ設定 Software Renderer OpenGL ES 3 ビデオレンダラ 使用するビデオレンダラー + 画面上のコントロールを描画 画質向上の設定 内部解像度の変更 diff --git a/Source/Android/res/values/strings.xml b/Source/Android/res/values/strings.xml index 009387ff77..01883fabd1 100644 --- a/Source/Android/res/values/strings.xml +++ b/Source/Android/res/values/strings.xml @@ -30,7 +30,6 @@ File clicked: - Draw on-screen controls Button A Button B Button Start @@ -55,7 +54,7 @@ Drawing on-screen controls Press button to configure %1$s - + Interpreter JIT64 Recompiler JITIL Recompiler @@ -70,6 +69,7 @@ OpenGL ES 3 Video Backend Video backend to use + Draw on-screen controls Enhancements Internal Resolution diff --git a/Source/Android/res/xml/video_prefs.xml b/Source/Android/res/xml/video_prefs.xml index 2abd8deabf..ec0c1837f7 100644 --- a/Source/Android/res/xml/video_prefs.xml +++ b/Source/Android/res/xml/video_prefs.xml @@ -124,4 +124,9 @@ android:key="gpuPref" android:summary="@string/video_backend_to_use" android:title="@string/video_backend" /> + + \ No newline at end of file diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/inputconfig/InputConfigFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/inputconfig/InputConfigFragment.java index 00794f3ea0..420d5796fa 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/inputconfig/InputConfigFragment.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/inputconfig/InputConfigFragment.java @@ -55,7 +55,6 @@ public final class InputConfigFragment extends Fragment public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { List Input = new ArrayList(); - Input.add(new InputConfigItem(getString(R.string.draw_onscreen_controls), "Android-ScreenControls", "True")); Input.add(new InputConfigItem(getString(R.string.button_a), "Android-InputA")); Input.add(new InputConfigItem(getString(R.string.button_b), "Android-InputB")); Input.add(new InputConfigItem(getString(R.string.button_start), "Android-InputStart")); diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java index 0bf8535492..225e8b4f3b 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java @@ -36,7 +36,9 @@ public final class UserPreferences // Add the settings. editor.putString("cpuCorePref", getConfig("Dolphin.ini", "Core", "CPUCore", "3")); editor.putBoolean("dualCorePref", getConfig("Dolphin.ini", "Core", "CPUThread", "False").equals("True")); - editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend ", "Software Renderer")); + + editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend ", "Software Renderer")); + editor.putString("drawOnscreenControls", getConfig("Dolphin.ini", "Android", "ScreenControls", "True")); editor.putString("internalResolution", getConfig("gfx_opengl.ini", "Settings", "EFBScale", "2") ); editor.putString("anisotropicFiltering", getConfig("gfx_opengl.ini", "Enhancements", "MaxAnisotropy", "0")); @@ -118,6 +120,9 @@ public final class UserPreferences // Current video backend being used. Falls back to software rendering upon error. String currentVideoBackend = prefs.getString("gpuPref", "Software Rendering"); + // Whether or not to draw on-screen controls. + boolean drawingOnscreenControls = prefs.getBoolean("drawOnscreenControls", true); + // Whether or not to ignore all EFB access requests from the CPU. boolean skipEFBAccess = prefs.getBoolean("skipEFBAccess", false); @@ -167,6 +172,7 @@ public final class UserPreferences // General Video Settings NativeLibrary.SetConfig("Dolphin.ini", "Core", "GFXBackend", currentVideoBackend); + NativeLibrary.SetConfig("Dolphin.ini", "Android", "ScreenControls", drawingOnscreenControls ? "True" : "False"); // Video Hack Settings NativeLibrary.SetConfig("gfx_opengl.ini", "Hacks", "EFBAccessEnable", skipEFBAccess ? "False" : "True");