summaryrefslogtreecommitdiff
path: root/Source/Android
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-09-12 23:08:00 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2013-09-12 23:08:00 -0500
commitba05db78280e8b7969092a65556ef1bef066c5cd (patch)
tree19b30469e7bf4060447c7b7891e00764251aa22b /Source/Android
parent1680f27739eeebeb7b48d91e8a4e3b80d7c75fe6 (diff)
[Android] Add a fastmem option to the cpu options, default disabled.
Diffstat (limited to 'Source/Android')
-rw-r--r--Source/Android/res/values/strings.xml2
-rw-r--r--Source/Android/res/xml/cpu_prefs.xml4
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java5
3 files changed, 11 insertions, 0 deletions
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 @@
<string name="emu_core_to_use">Emulation core to use</string>
<string name="dual_core">Dual Core</string>
<string name="dual_core_descrip">Split workload to two CPU cores instead of one. Increases speed.</string>
+ <string name="fastmem">Fastmem</string>
+ <string name="fastmem_desc">Uses potentially unsafe optimizations for memory access.</string>
<string name="video_settings">Video</string>
<string name="software_renderer">Software Renderer</string>
<string name="opengl_es3">OpenGL ES 3</string>
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" />
+ <CheckBoxPreference
+ android:key="fastmemPref"
+ android:summary="@string/fastmem_desc"
+ android:title="@string/fastmem" />
</PreferenceScreen> \ 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);