263 changes: 174 additions & 89 deletions Source/Android/.idea/workspace.xml

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions Source/Android/res/layout/prefs.xml
Expand Up @@ -3,13 +3,8 @@
>
<PreferenceCategory
android:summary="Settings"
android:title="CPU Settings" >
<ListPreference
android:entries="@array/cpuOptions"
android:entryValues="@array/cpuValues"
android:key="cpupref"
android:summary="Emulation core to use"
android:title="CPU Core" />
android:title="CPU Settings"
android:key="cpuprefcat">
<CheckBoxPreference
android:key="dualcorepref"
android:summary="On/Off"
Expand Down
10 changes: 0 additions & 10 deletions Source/Android/res/values/prefvalues.xml
@@ -1,15 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="cpuOptions">
<item>Interpreter</item>
<item>ARM JIT Recompiler</item>
</string-array>

<string-array name="cpuValues">
<item>0</item>
<item>3</item>
</string-array>

<string-array name="gpuOptions">
<item>Software Renderer</item>
<item>OpenGL ES 3</item>
Expand Down
45 changes: 45 additions & 0 deletions Source/Android/src/org/dolphinemu/dolphinemu/PrefsActivity.java
Expand Up @@ -2,8 +2,11 @@

import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceCategory;
import android.preference.PreferenceFragment;

/**
Expand All @@ -12,6 +15,7 @@
* Refer to the license.txt file included.
*/
public class PrefsActivity extends PreferenceActivity {
private PrefsActivity m_activity;

public class PrefsFragment extends PreferenceFragment {

Expand All @@ -21,12 +25,53 @@ public void onCreate(Bundle savedInstanceState) {

// Load the preferences from an XML resource
addPreferencesFromResource(R.layout.prefs);

final ListPreference etp = new ListPreference(m_activity);
CharSequence[] _entries;
CharSequence[] _entryvalues;

if (Build.CPU_ABI.contains("x86"))
{
_entries = new CharSequence[] {
"Interpreter",
"JIT64 Recompiler",
"JITIL Recompiler",
};
_entryvalues = new CharSequence[] {"0", "1", "2"};
}
else if (Build.CPU_ABI.contains("arm"))
{
_entries = new CharSequence[] {
"Interpreter",
"JIT ARM Recompiler",
};
_entryvalues = new CharSequence[] {"0", "3"};
}
else
{
_entries = new CharSequence[] {
"Interpreter",
};
_entryvalues = new CharSequence[] {"0"};
}

etp.setEntries(_entries);
etp.setEntryValues(_entryvalues);
etp.setKey("cpupref");
etp.setTitle("CPU Core");
etp.setSummary("Emulation core to use");

PreferenceCategory mCategory = (PreferenceCategory) findPreference("cpuprefcat");
mCategory.addPreference(etp);
}
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

m_activity = this;

getFragmentManager().beginTransaction().replace(android.R.id.content,
new PrefsFragment()).commit();
}
Expand Down