Merge pull request #2413 from sigmabeta/android-lollipop-settings

Android: Implement Settings screen in new UI.
This commit is contained in:
Lioncash 2015-05-20 19:14:22 -04:00
commit 23842cb75d
22 changed files with 1164 additions and 17 deletions

View File

@ -29,6 +29,7 @@ android {
}
}
// Define build types, which are orthogonal to product flavors.
buildTypes {
// Signed by release key, allowing for upload to Play Store.
release {
@ -43,6 +44,35 @@ android {
jniDebuggable true
}
}
// Define product flavors, which can be split into categories. Common examples
// of product flavors are paid vs. free, ARM vs. x86, etc.
productFlavors {
arm {
// This flavor is mutually exclusive against any flavor in the same dimension.
flavorDimension "abi"
// When building this flavor, only include native libs from the specified folder.
ndk {
abiFilter "armeabi-v7a"
}
}
arm_64 {
flavorDimension "abi"
ndk {
abiFilter "arm64-v8a"
}
}
// TODO Uncomment this when we successfully build for x86_64.
/*x86_64 {
flavorDimension "abi"
ndk {
abiFilter "x86_64"
}
}*/
}
}
dependencies {

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- All lists for ListPreference keys/values are placed here -->
<resources>
<!-- New UI CPU Core selection - ARM32 -->
<string-array name="string_emu_cores" translatable="false">
<item>@string/interpreter</item>
<item>@string/jit_arm_recompiler</item>
</string-array>
<string-array name="int_emu_cores" translatable="false">
<item>0</item>
<item>3</item>
</string-array>
</resources>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Title of the app -->
<string name="title_new_ui">Dolphin ARM32</string>
</resources>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- All lists for ListPreference keys/values are placed here -->
<resources>
<!-- New UI CPU Core selection - ARM64 -->
<string-array name="string_emu_cores" translatable="false">
<item>@string/interpreter</item>
<item>@string/jit_arm64_recompiler</item>
</string-array>
<string-array name="int_emu_cores" translatable="false">
<item>0</item>
<item>4</item>
</string-array>
</resources>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Title of the app -->
<string name="title_new_ui">Dolphin ARM64</string>
</resources>

View File

@ -14,7 +14,7 @@
<activity
android:name=".activities.GameGridActivity"
android:label="Dolphin New UI"
android:label="@string/title_new_ui"
android:theme="@style/DolphinGamecube">
<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
@ -27,9 +27,14 @@
<activity
android:name=".activities.AddDirectoryActivity"
android:theme="@style/DolphinWii"
android:theme="@style/DolphinGamecube"
android:label="@string/add_directory_title"/>
<activity
android:name=".activities.SettingsActivity"
android:theme="@style/DolphinSettingsGamecube"
android:label="@string/grid_menu_settings"/>
<activity
android:name="org.dolphinemu.dolphinemu.gamelist.GameListActivity"
android:label="@string/app_name"
@ -60,7 +65,9 @@
android:label="@string/settings"
android:theme="@android:style/Theme.Holo.Light" />
<service android:name=".AssetCopyService"/>
<service android:name=".services.AssetCopyService"/>
<service android:name=".services.SettingsSaveService"/>
</application>

View File

@ -10,16 +10,17 @@ import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageButton;
import android.widget.Toolbar;
import org.dolphinemu.dolphinemu.AssetCopyService;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.adapters.GameAdapter;
import org.dolphinemu.dolphinemu.model.Game;
import org.dolphinemu.dolphinemu.model.GcGame;
import org.dolphinemu.dolphinemu.services.AssetCopyService;
import java.io.File;
import java.util.ArrayList;
@ -126,7 +127,27 @@ public final class GameGridActivity extends Activity
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_game_grid, menu);
return true;
}
/**
* Called by the framework whenever any actionbar/toolbar icon is clicked.
*
* @param item The icon that was clicked on.
* @return True if the event was handled, false to bubble it up to the OS.
*/
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case R.id.menu_settings:
// Launch the Settings Actvity.
Intent settings = new Intent(this, SettingsActivity.class);
startActivity(settings);
return true;
}
return false;
}
// TODO Replace all of this with a SQLite database
@ -172,7 +193,8 @@ public final class GameGridActivity extends Activity
}
}
} catch (Exception ignored)
}
catch (Exception ignored)
{
}

View File

@ -0,0 +1,41 @@
package org.dolphinemu.dolphinemu.activities;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import org.dolphinemu.dolphinemu.fragments.SettingsFragment;
import org.dolphinemu.dolphinemu.services.SettingsSaveService;
public final class SettingsActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Display the fragment as the main content.
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new SettingsFragment(), "settings_fragment")
.commit();
}
/**
* If this is called, the user has left the settings screen (potentially through the
* home button) and will expect their changes to be persisted. So we kick off an
* IntentService which will do so on a background thread.
*/
@Override
protected void onStop()
{
super.onStop();
Log.d("DolphinEmulator", "Settings activity stopping. Saving settings to INI...");
// Copy assets into appropriate locations.
Intent settingsSaver = new Intent(this, SettingsSaveService.class);
startService(settingsSaver);
}
}

View File

@ -0,0 +1,197 @@
package org.dolphinemu.dolphinemu.fragments;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Environment;
import android.preference.ListPreference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.utils.EGLHelper;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.microedition.khronos.opengles.GL10;
public final class SettingsFragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener
{
private SharedPreferences mPreferences;
private ListPreference mVideoBackendPreference;
private final EGLHelper mEglHelper = new EGLHelper(EGLHelper.EGL_OPENGL_ES2_BIT);
private final String mVendor = mEglHelper.getGL().glGetString(GL10.GL_VENDOR);
private final String mVersion = mEglHelper.getGL().glGetString(GL10.GL_VERSION);
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.preferences);
// TODO Below here is effectively ported from the old VideoSettingsFragment. There is
// TODO probably a simpler way to do this, but potentially could require UI discussion/feedback.
// Setting valid video backends.
mVideoBackendPreference = (ListPreference) findPreference("gpuPref");
final boolean deviceSupportsGL = mEglHelper.supportsOpenGL();
final boolean deviceSupportsGLES3 = mEglHelper.supportsGLES3();
if (deviceSupportsGL)
{
mVideoBackendPreference.setEntries(R.array.videoBackendEntriesGL);
mVideoBackendPreference.setEntryValues(R.array.videoBackendValuesGL);
}
else if (deviceSupportsGLES3)
{
mVideoBackendPreference.setEntries(R.array.videoBackendEntriesGLES3);
mVideoBackendPreference.setEntryValues(R.array.videoBackendValuesGLES3);
}
else
{
mVideoBackendPreference.setEntries(R.array.videoBackendEntriesNoGLES3);
mVideoBackendPreference.setEntryValues(R.array.videoBackendValuesNoGLES3);
}
//
// Set available post processing shaders
//
List<CharSequence> shader_names = new ArrayList<CharSequence>();
List<CharSequence> shader_values = new ArrayList<CharSequence>();
// Disabled option
shader_names.add("Disabled");
shader_values.add("");
// TODO Since shaders are included with the APK, we know what they are at build-time. We should
// TODO be able to run this logic somehow at build-time and not rely on the device doing it.
File shaders_folder = new File(Environment.getExternalStorageDirectory() + File.separator + "dolphin-emu" + File.separator + "Shaders");
if (shaders_folder.exists())
{
File[] shaders = shaders_folder.listFiles();
for (File file : shaders)
{
if (file.isFile())
{
String filename = file.getName();
if (filename.endsWith(".glsl"))
{
// Strip the extension and put it in to the list
shader_names.add(filename.substring(0, filename.lastIndexOf('.')));
shader_values.add(filename.substring(0, filename.lastIndexOf('.')));
}
}
}
}
final ListPreference shader_preference = (ListPreference) findPreference("postProcessingShader");
shader_preference.setEntries(shader_names.toArray(new CharSequence[shader_names.size()]));
shader_preference.setEntryValues(shader_values.toArray(new CharSequence[shader_values.size()]));
//
// Disable all options if Software Rendering is used.
//
// Note that the numeric value in 'getPreference()'
// denotes the placement on the UI. So if more elements are
// added to the video settings, these may need to change.
//
mPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
if (mVideoBackendPreference.getValue().equals("Software Renderer"))
{
findPreference("enhancements").setEnabled(false);
findPreference("hacks").setEnabled(false);
findPreference("showFPS").setEnabled(false);
}
else if (mVideoBackendPreference.getValue().equals("OGL"))
{
findPreference("enhancements").setEnabled(true);
findPreference("hacks").setEnabled(true);
findPreference("showFPS").setEnabled(true);
// Check if we support stereo
// If we support desktop GL then we must support at least OpenGL 3.2
// If we only support OpenGLES then we need both OpenGLES 3.1 and AEP
if ((mEglHelper.supportsOpenGL() && mEglHelper.GetVersion() >= 320) ||
(mEglHelper.supportsGLES3() && mEglHelper.GetVersion() >= 310 && mEglHelper.SupportsExtension("GL_ANDROID_extension_pack_es31a")))
findPreference("StereoscopyScreen").setEnabled(true);
else
findPreference("StereoscopyScreen").setEnabled(false);
}
// Also set a listener, so that if someone changes the video backend, it will disable
// the video settings, upon the user choosing "Software Rendering".
mPreferences.registerOnSharedPreferenceChangeListener(this);
}
@Override
public void onSharedPreferenceChanged(SharedPreferences preferences, String key)
{
if (key.equals("gpuPref"))
{
if (preferences.getString(key, "Software Renderer").equals("Software Renderer"))
{
findPreference("enhancements").setEnabled(false);
findPreference("hacks").setEnabled(false);
findPreference("showFPS").setEnabled(false);
}
else if (preferences.getString(key, "Software Renderer").equals("OGL"))
{
findPreference("enhancements").setEnabled(true);
findPreference("hacks").setEnabled(true);
findPreference("showFPS").setEnabled(true);
// Create an alert telling them that their phone sucks
if (mEglHelper.supportsGLES3()
&& mVendor.equals("Qualcomm")
&& getQualcommVersion() == 14.0f)
{
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(R.string.device_compat_warning);
builder.setMessage(R.string.device_gles3compat_warning_msg);
builder.setPositiveButton(R.string.yes, null);
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
// Get an editor.
SharedPreferences.Editor editor = mPreferences.edit();
editor.putString("gpuPref", "Software Renderer");
editor.apply();
mVideoBackendPreference.setValue("Software Renderer");
}
});
builder.show();
}
}
}
}
private float getQualcommVersion()
{
final int start = mVersion.indexOf("V@") + 2;
final StringBuilder versionBuilder = new StringBuilder();
for (int i = start; i < mVersion.length(); i++)
{
char c = mVersion.charAt(i);
// End of numeric portion of version string.
if (c == ' ')
break;
versionBuilder.append(c);
}
return Float.parseFloat(versionBuilder.toString());
}
}

View File

@ -20,7 +20,6 @@ import android.os.Environment;
import android.preference.PreferenceManager;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@ -28,12 +27,12 @@ import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import org.dolphinemu.dolphinemu.AssetCopyService;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.about.AboutActivity;
import org.dolphinemu.dolphinemu.emulation.EmulationActivity;
import org.dolphinemu.dolphinemu.folderbrowser.FolderBrowser;
import org.dolphinemu.dolphinemu.services.AssetCopyService;
import org.dolphinemu.dolphinemu.settings.PrefsActivity;
import org.dolphinemu.dolphinemu.sidemenu.SideMenuAdapter;
import org.dolphinemu.dolphinemu.sidemenu.SideMenuItem;

View File

@ -4,13 +4,13 @@
* Refer to the license.txt file included.
*/
package org.dolphinemu.dolphinemu;
package org.dolphinemu.dolphinemu.services;
import android.app.IntentService;
import android.content.Intent;
import android.os.Environment;
import android.util.Log;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.settings.UserPreferences;
import java.io.File;

View File

@ -0,0 +1,30 @@
package org.dolphinemu.dolphinemu.services;
import android.app.IntentService;
import android.content.Intent;
import android.util.Log;
import org.dolphinemu.dolphinemu.settings.UserPreferences;
/**
* IntentServices, unlike regular services, inherently run on a background thread.
* This IntentService saves all the options the user set in the Java-based UI into
* INI files the native code can read.
*/
public final class SettingsSaveService extends IntentService
{
private static final String TAG = "DolphinEmulator";
public SettingsSaveService()
{
super("SettingsSaveService");
}
@Override
protected void onHandleIntent(Intent intent)
{
Log.v(TAG, "Saving settings to INI files...");
UserPreferences.SavePrefsToIni(this);
Log.v(TAG, "Save successful.");
}
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/frame_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
tools:listitem="@layout/list_item_file"
android:elevation="4dp"
android:background="@android:color/white"/>
</LinearLayout>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/clearGameList"
android:title="@string/clear_game_list"
android:id="@+id/menu_settings"
android:title="@string/grid_menu_settings"
android:showAsAction="never"/>
</menu>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 1024dp of available width. -->
<dimen name="activity_horizontal_margin">96dp</dimen>
</resources>

View File

@ -1,6 +1,5 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
(such as screen margins) for screens with more than 820dp of available width. -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View File

@ -43,6 +43,13 @@
<item>0</item>
</string-array>
<!-- New UI CPU Core selection - Default -->
<string-array name="string_emu_cores" translatable="false">
<item>@string/interpreter</item>
</string-array>
<string-array name="int_emu_cores" translatable="false">
<item>0</item>
</string-array>
<!-- Video Backend Selection - Supports OpenGL ES 3 -->
<string-array name="videoBackendEntriesGLES3" translatable="false">

View File

@ -220,8 +220,20 @@
<string name="disabled">Disabled</string>
<string name="other">Other</string>
<!-- New UI Strings -->
<string name="title_new_ui">Dolphin New UI</string>
<!-- Game Grid Screen-->
<string name="grid_menu_settings">Settings</string>
<!-- Add Directory Screen-->
<string name="add_directory_title">Add Folder to Library</string>
<string name="add_directory_up_one_level">Up one level</string>
<string name="add_directory_empty_folder">That folder is empty.</string>
<!-- Preferences Screen -->
<string name="preferences_cpu">CPU Settings</string>
<string name="preferences_input">Input Settings</string>
<string name="preferences_video">Video Settings</string>
</resources>

View File

@ -9,6 +9,12 @@
<item name="android:colorPrimaryDark">@color/dolphin_blue_dark</item>
</style>
<!-- Same as above, but use default action bar, and mandate margins. -->
<style name="DolphinSettingsBase" parent="android:Theme.Material.Light.DarkActionBar">
<item name="android:colorPrimary">@color/dolphin_blue</item>
<item name="android:colorPrimaryDark">@color/dolphin_blue_dark</item>
</style>
<!-- Inherit from the Base Dolphin Theme-->
<style name="DolphinWii" parent="DolphinBase">
<!-- theme UI controls like checkboxes and text fields -->
@ -24,4 +30,20 @@
<!-- theme UI controls like checkboxes and text fields -->
<item name="android:colorAccent">@color/dolphin_accent_wiiware</item>
</style>
<!-- Inherit from the Base Dolphin Settings Theme-->
<style name="DolphinSettingsWii" parent="DolphinSettingsBase">
<!-- theme UI controls like checkboxes and text fields -->
<item name="android:colorAccent">@color/dolphin_accent_wii</item>
</style>
<style name="DolphinSettingsGamecube" parent="DolphinSettingsBase">
<!-- theme UI controls like checkboxes and text fields -->
<item name="android:colorAccent">@color/dolphin_accent_gamecube</item>
</style>
<style name="DolphinSettingsWiiware" parent="DolphinSettingsBase">
<!-- theme UI controls like checkboxes and text fields -->
<item name="android:colorAccent">@color/dolphin_accent_wiiware</item>
</style>
</resources>

View File

@ -0,0 +1,690 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:key="preferences_cpu"
android:title="@string/preferences_cpu">
<!-- CPU Settings -->
<CheckBoxPreference
android:defaultValue="false"
android:key="dualCorePref"
android:summary="@string/dual_core_descrip"
android:title="@string/dual_core"/>
<ListPreference
android:key="cpuCorePref"
android:summary="@string/cpu_core_desc"
android:title="@string/cpu_core"
android:entries="@array/string_emu_cores"
android:entryValues="@array/int_emu_cores"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="fastmemPref"
android:summary="@string/fastmem_desc"
android:title="@string/fastmem"/>
</PreferenceCategory>
<PreferenceCategory
android:key="preferences_input"
android:title="@string/preferences_input">
<PreferenceScreen
android:key="input_overlay"
android:summary="@string/input_overlay_desc"
android:title="@string/input_overlay">
<Preference
android:key="inputOverlayConfigPref"
android:summary="@string/input_overlay_layout_desc"
android:title="@string/input_overlay_layout">
<intent
android:targetClass="org.dolphinemu.dolphinemu.settings.input.overlayconfig.OverlayConfigActivity"
android:targetPackage="org.dolphinemu.dolphinemu.debug"/>
</Preference>
<SeekBarPreference
android:defaultValue="25"
android:key="controls_size"
android:max="75"
android:title="@string/controls_size"/>
</PreferenceScreen>
<!-- GameCube controller bindings -->
<PreferenceScreen
android:key="gamecube_bindings"
android:title="@string/gamecube_bindings">
<PreferenceScreen
android:key="gamecube_bindings_control_0"
android:title="@string/controller_0">
<CheckBoxPreference
android:key="enableController1"
android:title="@string/enable_controller"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="InputA_0"
android:title="@string/button_a"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="InputB_0"
android:title="@string/button_b"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="InputX_0"
android:title="@string/button_x"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="InputY_0"
android:title="@string/button_y"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="InputZ_0"
android:title="@string/button_z"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="InputStart_0"
android:title="@string/button_start"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="DPadUp_0"
android:title="@string/dpad_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="DPadDown_0"
android:title="@string/dpad_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="DPadLeft_0"
android:title="@string/dpad_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="DPadRight_0"
android:title="@string/dpad_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="MainUp_0"
android:title="@string/main_stick_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="MainDown_0"
android:title="@string/main_stick_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="MainLeft_0"
android:title="@string/main_stick_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="MainRight_0"
android:title="@string/main_stick_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="CStickUp_0"
android:title="@string/c_stick_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="CStickDown_0"
android:title="@string/c_stick_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="CStickLeft_0"
android:title="@string/c_stick_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="CStickRight_0"
android:title="@string/c_stick_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="InputL_0"
android:title="@string/trigger_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController1"
android:key="InputR_0"
android:title="@string/trigger_right"/>
</PreferenceScreen>
<PreferenceScreen
android:key="gamecube_bindings_control_1"
android:title="@string/controller_1">
<CheckBoxPreference
android:key="enableController2"
android:title="@string/enable_controller"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="InputA_1"
android:title="@string/button_a"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="InputB_1"
android:title="@string/button_b"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="InputX_1"
android:title="@string/button_x"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="InputY_1"
android:title="@string/button_y"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="InputZ_1"
android:title="@string/button_z"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="InputStart_1"
android:title="@string/button_start"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="DPadUp_1"
android:title="@string/dpad_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="DPadDown_1"
android:title="@string/dpad_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="DPadLeft_1"
android:title="@string/dpad_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="DPadRight_1"
android:title="@string/dpad_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="MainUp_1"
android:title="@string/main_stick_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="MainDown_1"
android:title="@string/main_stick_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="MainLeft_1"
android:title="@string/main_stick_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="MainRight_1"
android:title="@string/main_stick_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="CStickUp_1"
android:title="@string/c_stick_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="CStickDown_1"
android:title="@string/c_stick_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="CStickLeft_1"
android:title="@string/c_stick_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="CStickRight_1"
android:title="@string/c_stick_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="InputL_1"
android:title="@string/trigger_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController2"
android:key="InputR_1"
android:title="@string/trigger_right"/>
</PreferenceScreen>
<PreferenceScreen
android:key="gamecube_bindings_control_2"
android:title="@string/controller_2">
<CheckBoxPreference
android:key="enableController3"
android:title="@string/enable_controller"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="InputA_2"
android:title="@string/button_a"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="InputB_2"
android:title="@string/button_b"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="InputX_2"
android:title="@string/button_x"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="InputY_2"
android:title="@string/button_y"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="InputZ_2"
android:title="@string/button_z"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="InputStart_2"
android:title="@string/button_start"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="DPadUp_2"
android:title="@string/dpad_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="DPadDown_2"
android:title="@string/dpad_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="DPadLeft_2"
android:title="@string/dpad_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="DPadRight_2"
android:title="@string/dpad_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="MainUp_2"
android:title="@string/main_stick_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="MainDown_2"
android:title="@string/main_stick_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="MainLeft_2"
android:title="@string/main_stick_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="MainRight_2"
android:title="@string/main_stick_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="CStickUp_2"
android:title="@string/c_stick_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="CStickDown_2"
android:title="@string/c_stick_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="CStickLeft_2"
android:title="@string/c_stick_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="CStickRight_2"
android:title="@string/c_stick_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="InputL_2"
android:title="@string/trigger_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController3"
android:key="InputR_2"
android:title="@string/trigger_right"/>
</PreferenceScreen>
<PreferenceScreen
android:key="gamecube_bindings_control_3"
android:title="@string/controller_3">
<CheckBoxPreference
android:key="enableController4"
android:title="@string/enable_controller"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="InputA_3"
android:title="@string/button_a"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="InputB_3"
android:title="@string/button_b"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="InputX_3"
android:title="@string/button_x"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="InputY_3"
android:title="@string/button_y"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="InputZ_3"
android:title="@string/button_z"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="InputStart_3"
android:title="@string/button_start"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="DPadUp_3"
android:title="@string/dpad_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="DPadDown_3"
android:title="@string/dpad_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="DPadLeft_3"
android:title="@string/dpad_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="DPadRight_3"
android:title="@string/dpad_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="MainUp_3"
android:title="@string/main_stick_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="MainDown_3"
android:title="@string/main_stick_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="MainLeft_3"
android:title="@string/main_stick_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="MainRight_3"
android:title="@string/main_stick_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="CStickUp_3"
android:title="@string/c_stick_up"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="CStickDown_3"
android:title="@string/c_stick_down"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="CStickLeft_3"
android:title="@string/c_stick_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="CStickRight_3"
android:title="@string/c_stick_right"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="InputL_3"
android:title="@string/trigger_left"/>
<org.dolphinemu.dolphinemu.settings.input.InputBindingPreference
android:dependency="enableController4"
android:key="InputR_3"
android:title="@string/trigger_right"/>
</PreferenceScreen>
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory
android:key="preferences_video"
android:title="@string/preferences_video"><!-- Video Settings -->
<!-- Video Enhancements -->
<PreferenceScreen
android:title="@string/enhancements"
android:key="enhancements">
<ListPreference
android:entries="@array/internalResolutionEntries"
android:entryValues="@array/internalResolutionValues"
android:key="internalResolution"
android:summary="@string/internal_resolution_descrip"
android:title="@string/internal_resolution"/>
<ListPreference
android:entries="@array/FSAAEntries"
android:entryValues="@array/FSAAValues"
android:key="FSAA"
android:summary="@string/FSAA_descrip"
android:title="@string/FSAA"/>
<ListPreference
android:entries="@array/anisotropicFilteringEntries"
android:entryValues="@array/anisotropicFilteringValues"
android:key="anisotropicFiltering"
android:summary="@string/anisotropic_filtering_descrip"
android:title="@string/anisotropic_filtering"/>
<ListPreference
android:key="postProcessingShader"
android:summary="@string/postprocessing_shader_descrip"
android:title="@string/postprocessing_shader"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="scaledEFBCopy"
android:summary="@string/scaled_efb_copy_descrip"
android:title="@string/scaled_efb_copy"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="perPixelLighting"
android:summary="@string/per_pixel_lighting_descrip"
android:title="@string/per_pixel_lighting"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="forceTextureFiltering"
android:summary="@string/force_texture_filtering_descrip"
android:title="@string/force_texture_filtering"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="disableFog"
android:summary="@string/disable_fog_descrip"
android:title="@string/disable_fog"/>
<PreferenceScreen
android:key="StereoscopyScreen"
android:summary="@string/stereoscopy_descrip"
android:title="@string/stereoscopy">
<ListPreference
android:entries="@array/stereoscopyEntries"
android:entryValues="@array/stereoscopyValues"
android:key="stereoscopyMode"
android:summary="@string/stereoscopy_mode_descrip"
android:title="@string/stereoscopy_mode"/>
<org.dolphinemu.dolphinemu.utils.SliderPreference
android:defaultValue="20"
android:key="stereoDepth"
android:max="100"
android:summary="@string/sterescopy_depth_descrip"
android:title="@string/sterescopy_depth"/>
<org.dolphinemu.dolphinemu.utils.SliderPreference
android:defaultValue="20"
android:key="stereoConvergence"
android:max="500"
android:summary="@string/convergence_descrip"
android:title="@string/convergence"/>
<CheckBoxPreference
android:defaultValue="false"
android:key="stereoSwapEyes"
android:summary="@string/swap_eyes_descrip"
android:title="@string/swap_eyes"/>
</PreferenceScreen>
</PreferenceScreen>
<!-- Video Hacks -->
<PreferenceScreen
android:title="@string/hacks"
android:key="hacks">
<PreferenceCategory android:title="@string/embedded_frame_buffer">
<CheckBoxPreference
android:defaultValue="false"
android:key="skipEFBAccess"
android:summary="@string/skip_efb_access_descrip"
android:title="@string/skip_efb_access"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="ignoreFormatChanges"
android:summary="@string/ignore_format_changes_descrip"
android:title="@string/ignore_format_changes"/>
<ListPreference
android:defaultValue="Texture"
android:entries="@array/efbCopyMethodEntries"
android:entryValues="@array/efbCopyMethodValues"
android:key="efbCopyMethod"
android:summary="@string/efb_copy_method_descrip"
android:title="@string/efb_copy_method"/>
</PreferenceCategory>
<!-- Texture Cache -->
<PreferenceCategory android:title="@string/texture_cache">
<ListPreference
android:defaultValue="Low"
android:entries="@array/textureCacheAccuracyEntries"
android:entryValues="@array/textureCacheAccuracyValues"
android:key="textureCacheAccuracy"
android:summary="@string/texture_cache_accuracy_descrip"
android:title="@string/texture_cache_accuracy"/>
</PreferenceCategory>
<!-- External Frame Buffer -->
<PreferenceCategory android:title="@string/external_frame_buffer">
<ListPreference
android:defaultValue="Disabled"
android:entries="@array/externalFrameBufferEntries"
android:entryValues="@array/externalFrameBufferValues"
android:key="externalFrameBuffer"
android:summary="@string/external_frame_buffer_descrip"
android:title="@string/external_frame_buffer"/>
</PreferenceCategory>
<!-- Other Hacks -->
<PreferenceCategory android:title="@string/other">
<CheckBoxPreference
android:defaultValue="false"
android:key="disableDestinationAlpha"
android:summary="@string/disable_destination_alpha_descrip"
android:title="@string/disable_destination_alpha"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="fastDepthCalculation"
android:summary="@string/fast_depth_calculation_descrip"
android:title="@string/fast_depth_calculation"/>
<ListPreference
android:defaultValue="0"
android:entries="@array/aspectRatioEntries"
android:entryValues="@array/aspectRatioValues"
android:key="aspectRatio"
android:summary="@string/aspect_ratio_descrip"
android:title="@string/aspect_ratio"/>
</PreferenceCategory>
</PreferenceScreen>
<ListPreference
android:key="gpuPref"
android:summary="@string/video_backend_desc"
android:title="@string/video_backend"/>
<CheckBoxPreference
android:key="showFPS"
android:summary="@string/show_fps_descrip"
android:title="@string/show_fps"/>
</PreferenceCategory>
<!-- TODO Add the About information here too. -->
</PreferenceScreen>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- All lists for ListPreference keys/values are placed here -->
<resources>
<!-- New UI CPU Core selection - x86_64 -->
<string-array name="string_emu_cores" translatable="false">
<item>@string/interpreter</item>
<item>@string/jit64_recompiler</item>
<item>@string/jitil_recompiler</item>
</string-array>
<string-array name="int_emu_cores" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
</resources>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Title of the app -->
<string name="title_new_ui">Dolphin ARM32</string>
</resources>