Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Add a fastmem option to the cpu options, default disabled.
  • Loading branch information
Sonicadvance1 committed Sep 13, 2013
1 parent 1680f27 commit ba05db7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Android/res/values/strings.xml
Expand Up @@ -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>
Expand Down
4 changes: 4 additions & 0 deletions Source/Android/res/xml/cpu_prefs.xml
Expand Up @@ -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>
Expand Up @@ -36,6 +36,7 @@ public static void LoadDolphinConfigToPrefs(Context ctx)
// 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"));
Expand Down Expand Up @@ -118,6 +119,9 @@ public static void SaveConfigToDolphinIni(Context ctx)
// 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");

Expand Down Expand Up @@ -173,6 +177,7 @@ public static void SaveConfigToDolphinIni(Context ctx)
// 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);
Expand Down

0 comments on commit ba05db7

Please sign in to comment.