From ba05db78280e8b7969092a65556ef1bef066c5cd Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 12 Sep 2013 23:08:00 -0500 Subject: [PATCH] [Android] Add a fastmem option to the cpu options, default disabled. --- Source/Android/res/values/strings.xml | 2 ++ Source/Android/res/xml/cpu_prefs.xml | 4 ++++ .../org/dolphinemu/dolphinemu/settings/UserPreferences.java | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/Source/Android/res/values/strings.xml b/Source/Android/res/values/strings.xml index f474984809..b3e4f9e3e6 100644 --- a/Source/Android/res/values/strings.xml +++ b/Source/Android/res/values/strings.xml @@ -72,6 +72,8 @@ Emulation core to use Dual Core Split workload to two CPU cores instead of one. Increases speed. + Fastmem + Uses potentially unsafe optimizations for memory access. Video Software Renderer OpenGL ES 3 diff --git a/Source/Android/res/xml/cpu_prefs.xml b/Source/Android/res/xml/cpu_prefs.xml index 83dc830791..3fd0f3ad2d 100644 --- a/Source/Android/res/xml/cpu_prefs.xml +++ b/Source/Android/res/xml/cpu_prefs.xml @@ -10,5 +10,9 @@ android:key="cpuCorePref" android:summary="@string/emu_core_to_use" android:title="@string/cpu_core" /> + \ No newline at end of file diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java index b29a91a63c..93fc9cf890 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java @@ -36,6 +36,7 @@ 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.putBoolean("fastmemPref", getConfig("Dolphin.ini", "Core", "Fastmem", "False").equals("True")); editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend", "Software Renderer")); editor.putBoolean("showFPS", getConfig("gfx_opengl.ini", "Settings", "ShowFPS", "False").equals("True")); @@ -118,6 +119,9 @@ public final class UserPreferences // Current CPU core being used. Falls back to interpreter upon error. String currentEmuCore = prefs.getString("cpuCorePref", "0"); + // Fastmem JIT core usage + boolean isUsingFastmem = prefs.getBoolean("fastmemPref", false); + // Current video backend being used. Falls back to software rendering upon error. String currentVideoBackend = prefs.getString("gpuPref", "Software Rendering"); @@ -173,6 +177,7 @@ public final class UserPreferences // CPU related Settings NativeLibrary.SetConfig("Dolphin.ini", "Core", "CPUCore", currentEmuCore); NativeLibrary.SetConfig("Dolphin.ini", "Core", "CPUThread", isUsingDualCore ? "True" : "False"); + NativeLibrary.SetConfig("Dolphin.ini", "Core", "Fastmem", isUsingFastmem ? "True" : "False"); // General Video Settings NativeLibrary.SetConfig("Dolphin.ini", "Core", "GFXBackend", currentVideoBackend);