Merge pull request #2576 from sigmabeta/android-controls

Android: Persist previously-set controller bindings on the Settings menu.
This commit is contained in:
Ryan Houdek 2015-06-09 16:56:34 -05:00
commit 7b0a65e295
8 changed files with 162 additions and 1388 deletions

View File

@ -18,7 +18,6 @@ import android.view.View;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.fragments.EmulationFragment;
import org.dolphinemu.dolphinemu.utils.InputConfigFragment;
import java.util.List;
@ -274,7 +273,7 @@ public final class EmulationActivity extends Activity
return false;
}
InputDevice input = event.getDevice();
boolean handled = NativeLibrary.onGamePadEvent(InputConfigFragment.getInputDesc(input), event.getKeyCode(), action);
boolean handled = NativeLibrary.onGamePadEvent(input.getDescriptor(), event.getKeyCode(), action);
return handled;
}
@ -295,7 +294,7 @@ public final class EmulationActivity extends Activity
for (InputDevice.MotionRange range : motions)
{
NativeLibrary.onGamePadMoveEvent(InputConfigFragment.getInputDesc(input), range.getAxis(), event.getAxisValue(range.getAxis()));
NativeLibrary.onGamePadMoveEvent(input.getDescriptor(), range.getAxis(), event.getAxisValue(range.getAxis()));
}
return true;

View File

@ -2,14 +2,15 @@ package org.dolphinemu.dolphinemu.dialogs;
import android.app.AlertDialog;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.MotionEvent;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.utils.InputConfigFragment;
import java.util.ArrayList;
import java.util.List;
@ -47,11 +48,10 @@ public final class MotionAlertDialog extends AlertDialog
{
case KeyEvent.ACTION_DOWN:
case KeyEvent.ACTION_UP:
InputDevice input = event.getDevice();
String bindStr = "Device '" + InputConfigFragment.getInputDesc(input) + "'-Button " + event.getKeyCode();
NativeLibrary.SetConfig("Dolphin.ini", "Android", inputPref.getKey(), bindStr);
inputPref.setSummary(bindStr);
dismiss();
saveInput(input, event, null, false);
return true;
default:
@ -90,17 +90,11 @@ public final class MotionAlertDialog extends AlertDialog
if (m_values.get(a) > (event.getAxisValue(range.getAxis()) + 0.5f))
{
String bindStr = "Device '" + InputConfigFragment.getInputDesc(input) + "'-Axis " + range.getAxis() + "-";
NativeLibrary.SetConfig("Dolphin.ini", "Android", inputPref.getKey(), bindStr);
inputPref.setSummary(bindStr);
dismiss();
saveInput(input, null, range, false);
}
else if (m_values.get(a) < (event.getAxisValue(range.getAxis()) - 0.5f))
{
String bindStr = "Device '" + InputConfigFragment.getInputDesc(input) + "'-Axis " + range.getAxis() + "+";
NativeLibrary.SetConfig("Dolphin.ini", "Android", inputPref.getKey(), bindStr);
inputPref.setSummary(bindStr);
dismiss();
saveInput(input, null, range, true);
}
}
}
@ -125,4 +119,66 @@ public final class MotionAlertDialog extends AlertDialog
return super.dispatchGenericMotionEvent(event);
}
/**
* Saves the provided input setting both to the INI file (so native code can use it) and as an
* Android preference (so it persists correctly, and is human-readable.)
*
* @param device Required; the InputDevice from which the input event originated.
* @param keyEvent If the event was a button push, this KeyEvent represents it and is required.
* @param motionRange If the event was an axis movement, this MotionRange represents it and is required.
* @param axisPositive If the event was an axis movement, this boolean indicates the direction and is required.
*/
private void saveInput(InputDevice device, KeyEvent keyEvent, InputDevice.MotionRange motionRange, boolean axisPositive)
{
String bindStr = null;
String uiString = null;
if (keyEvent != null)
{
bindStr = "Device '" + device.getDescriptor() + "'-Button " + keyEvent.getKeyCode();
uiString = device.getName() + ": Button " + keyEvent.getKeyCode();
}
if (motionRange != null)
{
if (axisPositive)
{
bindStr = "Device '" + device.getDescriptor() + "'-Axis " + motionRange.getAxis() + "+";
uiString = device.getName() + ": Axis " + motionRange.getAxis() + "+";
}
else
{
bindStr = "Device '" + device.getDescriptor() + "'-Axis " + motionRange.getAxis() + "-";
uiString = device.getName() + ": Axis " + motionRange.getAxis() + "-";
}
}
if (bindStr != null)
{
NativeLibrary.SetConfig("Dolphin.ini", "Android", inputPref.getKey(), bindStr);
}
else
{
Log.e("DolphinEmu", "Failed to save input to INI.");
}
if (uiString != null)
{
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext());
SharedPreferences.Editor editor = preferences.edit();
editor.putString(inputPref.getKey(), uiString);
editor.apply();
inputPref.setSummary(uiString);
}
else
{
Log.e("DolphinEmu", "Failed to save input to preference.");
}
dismiss();
}
}

View File

@ -3,6 +3,7 @@ package org.dolphinemu.dolphinemu.utils;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.util.AttributeSet;
@ -13,7 +14,7 @@ import org.dolphinemu.dolphinemu.dialogs.MotionAlertDialog;
* {@link Preference} subclass that represents a preference
* used for assigning a key bind.
*/
public final class InputBindingPreference extends Preference
public final class InputBindingPreference extends EditTextPreference
{
/**
* Constructor that is called when inflating an InputBindingPreference from XML.
@ -53,4 +54,13 @@ public final class InputBindingPreference extends Preference
// Everything is set, show the dialog.
dialog.show();
}
@Override
public CharSequence getSummary()
{
String summary = super.getSummary().toString();
return String.format(summary, getText());
}
}

View File

@ -1,103 +0,0 @@
/**
* Copyright 2013 Dolphin Emulator Project
* Licensed under GPLv2+
* Refer to the license.txt file included.
*/
package org.dolphinemu.dolphinemu.utils;
import android.app.Fragment;
import android.os.Build;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.view.InputDevice;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.R;
import java.util.List;
/**
* The {@link Fragment} responsible for implementing the functionality
* within the input control mapping config.
*/
public final class InputConfigFragment extends PreferenceFragment
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Expand the preferences from the XML.
addPreferencesFromResource(R.xml.input_prefs);
// Set the summary messages of the preferences to whatever binding
// is currently set within the Dolphin config.
final String[] gamecubeKeys =
{
"InputA", "InputB", "InputX", "InputY", "InputZ", "InputStart",
"DPadUp", "DPadDown", "DPadLeft", "DPadRight",
"MainUp", "MainDown", "MainLeft", "MainRight",
"CStickUp", "CStickDown", "CStickLeft", "CStickRight",
"InputL", "InputR"
};
final String[] wiimoteKeys =
{
"WiimoteInputA", "WiimoteInputB", "WiimoteInputOne", "WiimoteInputTwo", "WiimoteInputPlus", "WiimoteInputMinus", "WiimoteInputHome",
"WiimoteIRUp", "WiimoteIRDown", "WiimoteIRLeft", "WiimoteIRRight", "WiimoteIRForward", "WiimoteIRBackward",
"WiimoteSwingUp", "WiimoteSwingDown", "WiimoteSwingLeft", "WiimoteSwingRight",
"WiimoteTiltForward", "WiimoteTiltBackward", "WiimoteTiltLeft", "WiimoteTiltRight",
"WiimoteShakeX", "WiimoteShakeY", "WiimoteShakeZ",
"WiimoteDPadUp", "WiimoteDPadDown", "WiimoteDPadLeft", "WiimoteDPadRight"
};
for (int i = 0; i < 4; i++)
{
// Loop through the keys for all 4 GameCube controllers.
for (String key : gamecubeKeys)
{
final String binding = NativeLibrary.GetConfig("Dolphin.ini", "Android", key+"_"+i, "None");
final Preference pref = findPreference(key+"_"+i);
pref.setSummary(binding);
}
// Loop through the keys for the Wiimote
/*for (String key : wiimoteKeys)
{
final String binding = NativeLibrary.GetConfig("Dolphin.ini", "Android", key+"_"+i, "None");
final Preference pref = findPreference(key+"_"+i);
pref.setSummary(binding);
}*/
}
}
/**
* Gets the descriptor for the given {@link InputDevice}.
*
* @param input The {@link InputDevice} to get the descriptor of.
*
* @return the descriptor for the given {@link InputDevice}.
*/
public static String getInputDesc(InputDevice input)
{
if (input == null)
return "null"; // Happens when the InputDevice is from an unknown source
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
{
return input.getDescriptor();
}
else
{
List<InputDevice.MotionRange> motions = input.getMotionRanges();
StringBuilder fakeid = new StringBuilder();
for (InputDevice.MotionRange range : motions)
fakeid.append(range.getAxis());
return fakeid.toString();
}
}
}

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<!-- CPU Settings -->
<CheckBoxPreference
android:defaultValue="false"
android:key="dualCorePref"
android:summary="@string/dual_core_descrip"
android:title="@string/dual_core" />
<org.dolphinemu.dolphinemu.settings.custom.UpdatingListPreference
android:key="cpuCorePref"
android:summary="@string/cpu_core_desc"
android:title="@string/cpu_core" />
<CheckBoxPreference
android:defaultValue="false"
android:key="fastmemPref"
android:summary="@string/fastmem_desc"
android:title="@string/fastmem" />
</PreferenceScreen>

File diff suppressed because it is too large Load Diff

View File

@ -59,11 +59,9 @@
<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"/>
@ -71,109 +69,126 @@
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="InputA_0"
android:summary="%s"
android:title="@string/button_a"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="InputB_0"
android:summary="%s"
android:title="@string/button_b"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="InputX_0"
android:summary="%s"
android:title="@string/button_x"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="InputY_0"
android:summary="%s"
android:title="@string/button_y"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="InputZ_0"
android:summary="%s"
android:title="@string/button_z"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="InputStart_0"
android:summary="%s"
android:title="@string/button_start"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="DPadUp_0"
android:summary="%s"
android:title="@string/dpad_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="DPadDown_0"
android:summary="%s"
android:title="@string/dpad_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="DPadLeft_0"
android:summary="%s"
android:title="@string/dpad_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="DPadRight_0"
android:summary="%s"
android:title="@string/dpad_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="MainUp_0"
android:summary="%s"
android:title="@string/main_stick_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="MainDown_0"
android:summary="%s"
android:title="@string/main_stick_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="MainLeft_0"
android:summary="%s"
android:title="@string/main_stick_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="MainRight_0"
android:summary="%s"
android:title="@string/main_stick_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="CStickUp_0"
android:summary="%s"
android:title="@string/c_stick_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="CStickDown_0"
android:summary="%s"
android:title="@string/c_stick_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="CStickLeft_0"
android:summary="%s"
android:title="@string/c_stick_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="CStickRight_0"
android:summary="%s"
android:title="@string/c_stick_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="InputL_0"
android:summary="%s"
android:title="@string/trigger_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController1"
android:key="InputR_0"
android:summary="%s"
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"/>
@ -181,105 +196,123 @@
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="InputA_1"
android:summary="%s"
android:title="@string/button_a"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="InputB_1"
android:summary="%s"
android:title="@string/button_b"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="InputX_1"
android:summary="%s"
android:title="@string/button_x"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="InputY_1"
android:summary="%s"
android:title="@string/button_y"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="InputZ_1"
android:summary="%s"
android:title="@string/button_z"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="InputStart_1"
android:summary="%s"
android:title="@string/button_start"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="DPadUp_1"
android:summary="%s"
android:title="@string/dpad_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="DPadDown_1"
android:summary="%s"
android:title="@string/dpad_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="DPadLeft_1"
android:summary="%s"
android:title="@string/dpad_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="DPadRight_1"
android:summary="%s"
android:title="@string/dpad_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="MainUp_1"
android:summary="%s"
android:title="@string/main_stick_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="MainDown_1"
android:summary="%s"
android:title="@string/main_stick_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="MainLeft_1"
android:summary="%s"
android:title="@string/main_stick_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="MainRight_1"
android:summary="%s"
android:title="@string/main_stick_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="CStickUp_1"
android:summary="%s"
android:title="@string/c_stick_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="CStickDown_1"
android:summary="%s"
android:title="@string/c_stick_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="CStickLeft_1"
android:summary="%s"
android:title="@string/c_stick_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="CStickRight_1"
android:summary="%s"
android:title="@string/c_stick_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="InputL_1"
android:summary="%s"
android:title="@string/trigger_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController2"
android:key="InputR_1"
android:summary="%s"
android:title="@string/trigger_right"/>
</PreferenceScreen>
<PreferenceScreen
android:key="gamecube_bindings_control_2"
android:title="@string/controller_2">
@ -290,109 +323,126 @@
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="InputA_2"
android:summary="%s"
android:title="@string/button_a"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="InputB_2"
android:summary="%s"
android:title="@string/button_b"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="InputX_2"
android:summary="%s"
android:title="@string/button_x"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="InputY_2"
android:summary="%s"
android:title="@string/button_y"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="InputZ_2"
android:summary="%s"
android:title="@string/button_z"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="InputStart_2"
android:summary="%s"
android:title="@string/button_start"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="DPadUp_2"
android:summary="%s"
android:title="@string/dpad_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="DPadDown_2"
android:summary="%s"
android:title="@string/dpad_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="DPadLeft_2"
android:summary="%s"
android:title="@string/dpad_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="DPadRight_2"
android:summary="%s"
android:title="@string/dpad_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="MainUp_2"
android:summary="%s"
android:title="@string/main_stick_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="MainDown_2"
android:summary="%s"
android:title="@string/main_stick_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="MainLeft_2"
android:summary="%s"
android:title="@string/main_stick_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="MainRight_2"
android:summary="%s"
android:title="@string/main_stick_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="CStickUp_2"
android:summary="%s"
android:title="@string/c_stick_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="CStickDown_2"
android:summary="%s"
android:title="@string/c_stick_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="CStickLeft_2"
android:summary="%s"
android:title="@string/c_stick_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="CStickRight_2"
android:summary="%s"
android:title="@string/c_stick_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="InputL_2"
android:summary="%s"
android:title="@string/trigger_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController3"
android:key="InputR_2"
android:summary="%s"
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"/>
@ -400,105 +450,123 @@
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="InputA_3"
android:summary="%s"
android:title="@string/button_a"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="InputB_3"
android:summary="%s"
android:title="@string/button_b"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="InputX_3"
android:summary="%s"
android:title="@string/button_x"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="InputY_3"
android:summary="%s"
android:title="@string/button_y"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="InputZ_3"
android:summary="%s"
android:title="@string/button_z"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="InputStart_3"
android:summary="%s"
android:title="@string/button_start"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="DPadUp_3"
android:summary="%s"
android:title="@string/dpad_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="DPadDown_3"
android:summary="%s"
android:title="@string/dpad_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="DPadLeft_3"
android:summary="%s"
android:title="@string/dpad_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="DPadRight_3"
android:summary="%s"
android:title="@string/dpad_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="MainUp_3"
android:summary="%s"
android:title="@string/main_stick_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="MainDown_3"
android:summary="%s"
android:title="@string/main_stick_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="MainLeft_3"
android:summary="%s"
android:title="@string/main_stick_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="MainRight_3"
android:summary="%s"
android:title="@string/main_stick_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="CStickUp_3"
android:summary="%s"
android:title="@string/c_stick_up"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="CStickDown_3"
android:summary="%s"
android:title="@string/c_stick_down"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="CStickLeft_3"
android:summary="%s"
android:title="@string/c_stick_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="CStickRight_3"
android:summary="%s"
android:title="@string/c_stick_right"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="InputL_3"
android:summary="%s"
android:title="@string/trigger_left"/>
<org.dolphinemu.dolphinemu.utils.InputBindingPreference
android:dependency="enableController4"
android:key="InputR_3"
android:summary="%s"
android:title="@string/trigger_right"/>
</PreferenceScreen>
</PreferenceScreen>
</PreferenceCategory>

View File

@ -1,178 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Video Settings -->
<!-- Video Enhancements -->
<PreferenceScreen android:title="@string/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:title="@string/stereoscopy"
android:key="StereoscopyScreen"
android:summary="@string/stereoscopy_descrip">
<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">
<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>
<org.dolphinemu.dolphinemu.settings.custom.UpdatingListPreference
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"/>
</PreferenceScreen>