[Android] Migrate the "Draw Onscreen Controls" preference to the video settings.

This commit is contained in:
Lioncash 2013-08-20 20:28:48 -04:00
parent 9170c9b360
commit e52c2ac337
5 changed files with 15 additions and 6 deletions

View File

@ -30,7 +30,6 @@
<string name="file_clicked">クリックされたファイル: </string>
<!-- Input Config Fragment -->
<string name="draw_onscreen_controls">画面上のコントロールを描画</string>
<string name="button_a">Aボタン</string>
<string name="button_b">Bボタン</string>
<string name="button_start">スタートボタン</string>
@ -66,12 +65,12 @@
<string name="emu_core_to_use">使用するエミュレーションコア</string>
<string name="dual_core">デュアルコア</string>
<string name="on_off">有効/無効</string>
<string name="video_settings">ビデオ設定</string>
<string name="software_renderer">Software Renderer</string>
<string name="opengl_es3">OpenGL ES 3</string>
<string name="video_backend">ビデオレンダラ</string>
<string name="video_backend_to_use">使用するビデオレンダラー</string>
<string name="draw_onscreen_controls">画面上のコントロールを描画</string>
<string name="enhancements">画質向上の設定</string>
<string name="internal_resolution">内部解像度の変更</string>

View File

@ -30,7 +30,6 @@
<string name="file_clicked">File clicked: </string>
<!-- Input Config Fragment -->
<string name="draw_onscreen_controls">Draw on-screen controls</string>
<string name="button_a">Button A</string>
<string name="button_b">Button B</string>
<string name="button_start">Button Start</string>
@ -55,7 +54,7 @@
<string name="drawing_onscreen_controls">Drawing on-screen controls</string>
<string name="press_button_to_config">Press button to configure %1$s</string>
<!-- Prefs Fragment -->
<!-- Preference Related -->
<string name="interpreter">Interpreter</string>
<string name="jit64_recompiler">JIT64 Recompiler</string>
<string name="jitil_recompiler">JITIL Recompiler</string>
@ -70,6 +69,7 @@
<string name="opengl_es3">OpenGL ES 3</string>
<string name="video_backend">Video Backend</string>
<string name="video_backend_to_use">Video backend to use</string>
<string name="draw_onscreen_controls">Draw on-screen controls</string>
<string name="enhancements">Enhancements</string>
<string name="internal_resolution">Internal Resolution</string>

View File

@ -124,4 +124,9 @@
android:key="gpuPref"
android:summary="@string/video_backend_to_use"
android:title="@string/video_backend" />
<CheckBoxPreference
android:defaultValue="true"
android:key="drawOnscreenControls"
android:title="@string/draw_onscreen_controls"/>
</PreferenceScreen>

View File

@ -55,7 +55,6 @@ public final class InputConfigFragment extends Fragment
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
List<InputConfigItem> Input = new ArrayList<InputConfigItem>();
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"));

View File

@ -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");