Android: Add input binding menus

This commit is contained in:
Sean Maas 2016-10-30 19:27:43 -04:00
parent d10b336b0a
commit a90731e2ae
10 changed files with 818 additions and 132 deletions

View File

@ -162,6 +162,12 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
mPresenter.onWiimoteSettingChanged(section, value);
}
@Override
public void onExtensionSettingChanged(String key, int value)
{
mPresenter.onExtensionSettingChanged(key, value);
}
private SettingsFragment getFragment()
{
return (SettingsFragment) getFragmentManager().findFragmentByTag(SettingsFragment.FRAGMENT_TAG);

View File

@ -3,6 +3,8 @@ package org.dolphinemu.dolphinemu.ui.settings;
import android.os.Bundle;
import org.dolphinemu.dolphinemu.BuildConfig;
import org.dolphinemu.dolphinemu.DolphinApplication;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.model.settings.SettingSection;
import org.dolphinemu.dolphinemu.utils.Log;
@ -110,15 +112,9 @@ public final class SettingsActivityPresenter
public void onGcPadSettingChanged(String key, int value)
{
switch (value)
if (value != 0) // Not disabled
{
case 6:
mView.showToastMessage("Configuration coming soon. Settings from old versions will still work.");
break;
case 12:
mView.showSettingsFragment(key, true);
break;
mView.showSettingsFragment(key + (value / 6), true);
}
}
@ -127,7 +123,7 @@ public final class SettingsActivityPresenter
switch (value)
{
case 1:
mView.showToastMessage("Configuration coming soon. Settings from old versions will still work.");
mView.showSettingsFragment(section, true);
break;
case 2:
@ -135,4 +131,12 @@ public final class SettingsActivityPresenter
break;
}
}
public void onExtensionSettingChanged(String key, int value)
{
if (value != 0) // None
{
mView.showSettingsFragment(key + value, true);
}
}
}

View File

@ -90,4 +90,13 @@ public interface SettingsActivityView
* @param value New setting for the Wiimote.
*/
void onWiimoteSettingChanged(String section, int value);
/**
* Called by a containing Fragment to tell the containing Activity that an extension setting
* was modified.
*
* @param key Identifier for the extension that was modified.
* @param value New setting for the extension.
*/
void onExtensionSettingChanged(String key, int value);
}

View File

@ -210,7 +210,7 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(mContext);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString(item.getKey(), "");
editor.remove(item.getKey());
editor.apply();
}
});
@ -250,7 +250,12 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
if (scSetting.getKey().equals(SettingsFile.KEY_WIIMOTE_TYPE))
{
mView.onWiimoteSettingChanged(scSetting.getSetting().getSection(), value);
mView.onWiimoteSettingChanged(scSetting.getSection(), value);
}
if (scSetting.getKey().equals(SettingsFile.KEY_WIIMOTE_EXTENSION))
{
mView.onExtensionSettingChanged(scSetting.getKey() + Character.getNumericValue(scSetting.getSection().charAt(scSetting.getSection().length() - 1)), value);
}
// Get the backing Setting, which may be null (if for example it was missing from the file)
@ -269,6 +274,10 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
{
putXfbSetting(which);
}
else if (scSetting.getKey().equals(SettingsFile.KEY_WIIMOTE_EXTENSION))
{
putExtensionSetting(which, Character.getNumericValue(scSetting.getSection().charAt(scSetting.getSection().length() - 1)));
}
}
closeDialog();
@ -427,4 +436,11 @@ public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolde
mView.putSetting(xfbEnable);
mView.putSetting(xfbReal);
}
public void putExtensionSetting(int which, int wiimoteNumber)
{
StringSetting extension = new StringSetting(SettingsFile.KEY_WIIMOTE_EXTENSION, SettingsFile.SECTION_WIIMOTE + wiimoteNumber,
SettingsFile.SETTINGS_WIIMOTE, mContext.getResources().getStringArray(R.array.wiimoteExtensionsEntries)[which]);
mView.putSetting(extension);
}
}

View File

@ -168,6 +168,12 @@ public final class SettingsFragment extends Fragment implements SettingsFragment
mActivity.onWiimoteSettingChanged(section, value);
}
@Override
public void onExtensionSettingChanged(String key, int value)
{
mActivity.onExtensionSettingChanged(key, value);
}
public static final String FRAGMENT_TAG = BuildConfig.APPLICATION_ID + ".fragment.settings";
public static final String ARGUMENT_MENU_TAG = FRAGMENT_TAG + ".menu_tag";

View File

@ -8,6 +8,7 @@ import org.dolphinemu.dolphinemu.model.settings.SettingSection;
import org.dolphinemu.dolphinemu.model.settings.StringSetting;
import org.dolphinemu.dolphinemu.model.settings.view.CheckBoxSetting;
import org.dolphinemu.dolphinemu.model.settings.view.HeaderSetting;
import org.dolphinemu.dolphinemu.model.settings.view.InputBindingSetting;
import org.dolphinemu.dolphinemu.model.settings.view.SettingsItem;
import org.dolphinemu.dolphinemu.model.settings.view.SingleChoiceSetting;
import org.dolphinemu.dolphinemu.model.settings.view.SliderSetting;
@ -27,7 +28,8 @@ public final class SettingsFragmentPresenter
private ArrayList<HashMap<String, SettingSection>> mSettings;
private ArrayList<SettingsItem> mSettingsList;
private int mGcPadNumber;
private int mControllerNumber;
private int mControllerType;
public SettingsFragmentPresenter(SettingsFragmentView view)
{
@ -39,7 +41,19 @@ public final class SettingsFragmentPresenter
if (menuTag.startsWith(SettingsFile.KEY_GCPAD_TYPE))
{
mMenuTag = SettingsFile.KEY_GCPAD_TYPE;
mGcPadNumber = Integer.valueOf(menuTag.substring(menuTag.length() - 1));
mControllerNumber = Character.getNumericValue(menuTag.charAt(menuTag.length() - 2));
mControllerType = Character.getNumericValue(menuTag.charAt(menuTag.length() - 1));
}
else if (menuTag.startsWith(SettingsFile.SECTION_WIIMOTE) && !menuTag.equals(SettingsFile.FILE_NAME_WIIMOTE))
{
mMenuTag = SettingsFile.SECTION_WIIMOTE;
mControllerNumber = Character.getNumericValue(menuTag.charAt(menuTag.length() - 1)) + 3;
}
else if (menuTag.startsWith(SettingsFile.KEY_WIIMOTE_EXTENSION))
{
mMenuTag = SettingsFile.KEY_WIIMOTE_EXTENSION;
mControllerNumber = Character.getNumericValue(menuTag.charAt(menuTag.length() - 2)) + 3;
mControllerType = Character.getNumericValue(menuTag.charAt(menuTag.length() - 1));
}
else
{
@ -120,7 +134,15 @@ public final class SettingsFragmentPresenter
break;
case SettingsFile.KEY_GCPAD_TYPE:
addGcAdapterSettings(sl, mGcPadNumber);
addGcPadSubSettings(sl, mControllerNumber, mControllerType);
break;
case SettingsFile.SECTION_WIIMOTE:
addWiimoteSubSettings(sl, mControllerNumber);
break;
case SettingsFile.KEY_WIIMOTE_EXTENSION:
addExtensionTypeSettings(sl, mControllerNumber, mControllerType);
break;
default:
@ -284,13 +306,471 @@ public final class SettingsFragmentPresenter
sl.add(new SingleChoiceSetting(SettingsFile.KEY_ASPECT_RATIO, SettingsFile.SECTION_GFX_SETTINGS, SettingsFile.SETTINGS_GFX, R.string.aspect_ratio, R.string.aspect_ratio_descrip, R.array.aspectRatioEntries, R.array.aspectRatioValues, 0, aspectRatio));
}
private void addGcAdapterSettings(ArrayList<SettingsItem> sl, int gcPadNumber)
private void addGcPadSubSettings(ArrayList<SettingsItem> sl, int gcPadNumber, int gcPadType)
{
Setting rumble = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_CORE).getSetting(SettingsFile.KEY_GCADAPTER_RUMBLE + gcPadNumber);
Setting bongos = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_CORE).getSetting(SettingsFile.KEY_GCADAPTER_BONGOS + gcPadNumber);
if (gcPadType == 1) // Emulated
{
Setting bindA = null;
Setting bindB = null;
Setting bindX = null;
Setting bindY = null;
Setting bindZ = null;
Setting bindStart = null;
Setting bindControlUp = null;
Setting bindControlDown = null;
Setting bindControlLeft = null;
Setting bindControlRight = null;
Setting bindCUp = null;
Setting bindCDown = null;
Setting bindCLeft = null;
Setting bindCRight = null;
Setting bindTriggerL = null;
Setting bindTriggerR = null;
Setting bindDPadUp = null;
Setting bindDPadDown = null;
Setting bindDPadLeft = null;
Setting bindDPadRight = null;
sl.add(new CheckBoxSetting(SettingsFile.KEY_GCADAPTER_RUMBLE + gcPadNumber, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.gc_adapter_rumble, R.string.gc_adapter_rumble_description, false, rumble));
sl.add(new CheckBoxSetting(SettingsFile.KEY_GCADAPTER_BONGOS + gcPadNumber, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.gc_adapter_bongos, R.string.gc_adapter_bongos_description, false, bongos));
try
{
bindA = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_A + gcPadNumber);
bindB = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_B + gcPadNumber);
bindX = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_X + gcPadNumber);
bindY = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_Y + gcPadNumber);
bindZ = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_Z + gcPadNumber);
bindStart = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_START + gcPadNumber);
bindControlUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_CONTROL_UP + gcPadNumber);
bindControlDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_CONTROL_DOWN + gcPadNumber);
bindControlLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_CONTROL_LEFT + gcPadNumber);
bindControlRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_CONTROL_RIGHT + gcPadNumber);
bindCUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_C_UP + gcPadNumber);
bindCDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_C_DOWN + gcPadNumber);
bindCLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_C_LEFT + gcPadNumber);
bindCRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_C_RIGHT + gcPadNumber);
bindTriggerL = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_TRIGGER_L + gcPadNumber);
bindTriggerR = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_TRIGGER_R + gcPadNumber);
bindDPadUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_DPAD_UP + gcPadNumber);
bindDPadDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_DPAD_DOWN + gcPadNumber);
bindDPadLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_DPAD_LEFT + gcPadNumber);
bindDPadRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_GCBIND_DPAD_RIGHT + gcPadNumber);
}
catch (NullPointerException ex)
{
mSettings.get(SettingsFile.SETTINGS_DOLPHIN).put(SettingsFile.SECTION_BINDINGS, new SettingSection(SettingsFile.SECTION_BINDINGS));
mView.passSettingsToActivity(mSettings);
}
sl.add(new HeaderSetting(null, null, R.string.generic_buttons, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_A + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_a, bindA));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_B + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_b, bindB));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_X + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_x, bindX));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_Y + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_y, bindY));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_Z + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_z, bindZ));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_START + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_start, bindStart));
sl.add(new HeaderSetting(null, null, R.string.controller_control, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_CONTROL_UP + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindControlUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_CONTROL_DOWN + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindControlDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_CONTROL_LEFT + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindControlLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_CONTROL_RIGHT + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindControlRight));
sl.add(new HeaderSetting(null, null, R.string.controller_c, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_C_UP + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindCUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_C_DOWN + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindCDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_C_LEFT + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindCLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_C_RIGHT + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindCRight));
sl.add(new HeaderSetting(null, null, R.string.controller_trig, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_TRIGGER_L + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.trigger_left, bindTriggerL));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_TRIGGER_R + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.trigger_right, bindTriggerR));
sl.add(new HeaderSetting(null, null, R.string.controller_dpad, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_DPAD_UP + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindDPadUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_DPAD_DOWN + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindDPadDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_DPAD_LEFT + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindDPadLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_GCBIND_DPAD_RIGHT + gcPadNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindDPadRight));
}
else // Adapter
{
Setting rumble = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_CORE).getSetting(SettingsFile.KEY_GCADAPTER_RUMBLE + gcPadNumber);
Setting bongos = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_CORE).getSetting(SettingsFile.KEY_GCADAPTER_BONGOS + gcPadNumber);
sl.add(new CheckBoxSetting(SettingsFile.KEY_GCADAPTER_RUMBLE + gcPadNumber, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.gc_adapter_rumble, R.string.gc_adapter_rumble_description, false, rumble));
sl.add(new CheckBoxSetting(SettingsFile.KEY_GCADAPTER_BONGOS + gcPadNumber, SettingsFile.SECTION_CORE, SettingsFile.SETTINGS_DOLPHIN, R.string.gc_adapter_bongos, R.string.gc_adapter_bongos_description, false, bongos));
}
}
private void addWiimoteSubSettings(ArrayList<SettingsItem> sl, int wiimoteNumber)
{
mSettings.get(SettingsFile.SETTINGS_DOLPHIN).put(SettingsFile.SECTION_BINDINGS, new SettingSection(SettingsFile.SECTION_BINDINGS));
IntSetting extension = null;
Setting bindA = null;
Setting bindB = null;
Setting bind1 = null;
Setting bind2 = null;
Setting bindMinus = null;
Setting bindPlus = null;
Setting bindHome = null;
Setting bindIRUp = null;
Setting bindIRDown = null;
Setting bindIRLeft = null;
Setting bindIRRight = null;
Setting bindIRForward = null;
Setting bindIRBackward = null;
Setting bindIRHide = null;
Setting bindSwingUp = null;
Setting bindSwingDown = null;
Setting bindSwingLeft = null;
Setting bindSwingRight = null;
Setting bindSwingForward = null;
Setting bindSwingBackward = null;
Setting bindTiltForward = null;
Setting bindTiltBackward = null;
Setting bindTiltLeft = null;
Setting bindTiltRight = null;
Setting bindTiltModifier = null;
Setting bindShakeX = null;
Setting bindShakeY = null;
Setting bindShakeZ = null;
Setting bindDPadUp = null;
Setting bindDPadDown = null;
Setting bindDPadLeft = null;
Setting bindDPadRight = null;
try
{
// Bindings use controller numbers 4-7 (0-3 are GameCube), but the extension setting uses 1-4.
extension = new IntSetting(SettingsFile.KEY_WIIMOTE_EXTENSION, SettingsFile.SECTION_WIIMOTE + (wiimoteNumber - 3), SettingsFile.SETTINGS_WIIMOTE, getExtensionValue(wiimoteNumber - 3));
bindA = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_A + wiimoteNumber);
bindB = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_B + wiimoteNumber);
bind1 = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_1 + wiimoteNumber);
bind2 = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_2 + wiimoteNumber);
bindMinus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_MINUS + wiimoteNumber);
bindPlus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_PLUS + wiimoteNumber);
bindHome = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_HOME + wiimoteNumber);
bindIRUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_IR_UP + wiimoteNumber);
bindIRDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_IR_DOWN + wiimoteNumber);
bindIRLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_IR_LEFT + wiimoteNumber);
bindIRRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_IR_RIGHT + wiimoteNumber);
bindIRForward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_IR_FORWARD + wiimoteNumber);
bindIRBackward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_IR_BACKWARD + wiimoteNumber);
bindIRHide = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_IR_HIDE + wiimoteNumber);
bindSwingUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_SWING_UP + wiimoteNumber);
bindSwingDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_SWING_DOWN + wiimoteNumber);
bindSwingLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_SWING_LEFT + wiimoteNumber);
bindSwingRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_SWING_RIGHT + wiimoteNumber);
bindSwingForward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_SWING_FORWARD + wiimoteNumber);
bindSwingBackward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_SWING_BACKWARD + wiimoteNumber);
bindTiltForward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TILT_FORWARD + wiimoteNumber);
bindTiltBackward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TILT_BACKWARD + wiimoteNumber);
bindTiltLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TILT_LEFT + wiimoteNumber);
bindTiltRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TILT_RIGHT + wiimoteNumber);
bindTiltModifier = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TILT_MODIFIER + wiimoteNumber);
bindShakeX = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_SHAKE_X + wiimoteNumber);
bindShakeY = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_SHAKE_Y + wiimoteNumber);
bindShakeZ = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_SHAKE_Z + wiimoteNumber);
bindDPadUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DPAD_UP + wiimoteNumber);
bindDPadDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DPAD_DOWN + wiimoteNumber);
bindDPadLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DPAD_LEFT + wiimoteNumber);
bindDPadRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DPAD_RIGHT + wiimoteNumber);
}
catch (NullPointerException ex)
{
mSettings.get(SettingsFile.SETTINGS_DOLPHIN).put(SettingsFile.SECTION_BINDINGS, new SettingSection(SettingsFile.SECTION_BINDINGS));
mView.passSettingsToActivity(mSettings);
}
sl.add(new SingleChoiceSetting(SettingsFile.KEY_WIIMOTE_EXTENSION, SettingsFile.SECTION_WIIMOTE + (wiimoteNumber - 3), SettingsFile.SETTINGS_WIIMOTE, R.string.wiimote_extensions, R.string.wiimote_extensions_descrip, R.array.wiimoteExtensionsEntries, R.array.wiimoteExtensionsValues, 0, extension));
sl.add(new HeaderSetting(null, null, R.string.generic_buttons, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_A + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_a, bindA));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_B + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_b, bindB));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_1 + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_one, bind1));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_2 + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_two, bind2));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_MINUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_minus, bindMinus));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_PLUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_plus, bindPlus));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_HOME + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_home, bindHome));
sl.add(new HeaderSetting(null, null, R.string.wiimote_ir, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_IR_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindIRUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_IR_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindIRDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_IR_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindIRLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_IR_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindIRRight));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_IR_FORWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_forward, bindIRForward));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_IR_BACKWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_backward, bindIRBackward));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_IR_HIDE + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.ir_hide, bindIRHide));
sl.add(new HeaderSetting(null, null, R.string.wiimote_swing, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_SWING_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindSwingUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_SWING_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindSwingDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_SWING_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindSwingLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_SWING_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindSwingRight));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_SWING_FORWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_forward, bindSwingForward));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_SWING_BACKWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_backward, bindSwingBackward));
sl.add(new HeaderSetting(null, null, R.string.wiimote_tilt, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TILT_FORWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_forward, bindTiltForward));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TILT_BACKWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_backward, bindTiltBackward));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TILT_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindTiltLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TILT_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindTiltRight));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TILT_MODIFIER + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.tilt_modifier, bindTiltModifier));
sl.add(new HeaderSetting(null, null, R.string.wiimote_shake, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_SHAKE_X + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.shake_x, bindShakeX));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_SHAKE_Y + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.shake_y, bindShakeY));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_SHAKE_Z + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.shake_z, bindShakeZ));
sl.add(new HeaderSetting(null, null, R.string.controller_dpad, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DPAD_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindDPadUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DPAD_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindDPadDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DPAD_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindDPadLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DPAD_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindDPadRight));
}
private void addExtensionTypeSettings(ArrayList<SettingsItem> sl, int wiimoteNumber, int extentionType)
{
switch (extentionType)
{
case 1: // Nunchuk
Setting bindC = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_C + wiimoteNumber);
Setting bindZ = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_Z + wiimoteNumber);
Setting bindUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_UP + wiimoteNumber);
Setting bindDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_DOWN + wiimoteNumber);
Setting bindLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_LEFT + wiimoteNumber);
Setting bindRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_RIGHT + wiimoteNumber);
Setting bindSwingUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_UP + wiimoteNumber);
Setting bindSwingDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_DOWN + wiimoteNumber);
Setting bindSwingLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_LEFT + wiimoteNumber);
Setting bindSwingRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_RIGHT + wiimoteNumber);
Setting bindSwingForward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_FORWARD + wiimoteNumber);
Setting bindSwingBackward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_BACKWARD + wiimoteNumber);
Setting bindTiltForward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_FORWARD + wiimoteNumber);
Setting bindTiltBackward = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_BACKWARD + wiimoteNumber);
Setting bindTiltLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_LEFT + wiimoteNumber);
Setting bindTiltRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_RIGHT + wiimoteNumber);
Setting bindTiltModifier = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_MODIFIER + wiimoteNumber);
Setting bindShakeX = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SHAKE_X + wiimoteNumber);
Setting bindShakeY = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SHAKE_Y + wiimoteNumber);
Setting bindShakeZ = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SHAKE_Z + wiimoteNumber);
sl.add(new HeaderSetting(null, null, R.string.generic_buttons, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_C + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.nunchuk_button_c, bindC));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_Z + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_z, bindZ));
sl.add(new HeaderSetting(null, null, R.string.generic_stick, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindRight));
sl.add(new HeaderSetting(null, null, R.string.wiimote_swing, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindSwingUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindSwingDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindSwingLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindSwingRight));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_FORWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_forward, bindSwingForward));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_BACKWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_backward, bindSwingBackward));
sl.add(new HeaderSetting(null, null, R.string.wiimote_tilt, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_FORWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_forward, bindTiltForward));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_BACKWARD + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_backward, bindTiltBackward));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindTiltLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindTiltRight));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_MODIFIER + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.tilt_modifier, bindTiltModifier));
sl.add(new HeaderSetting(null, null, R.string.wiimote_shake, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SHAKE_X + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.shake_x, bindShakeX));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SHAKE_Y + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.shake_y, bindShakeY));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_NUNCHUK_SHAKE_Z + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.shake_z, bindShakeZ));
break;
case 2: // Classic
Setting bindA = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_A + wiimoteNumber);
Setting bindB = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_B + wiimoteNumber);
Setting bindX = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_X + wiimoteNumber);
Setting bindY = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_Y + wiimoteNumber);
Setting bindZL = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_ZL + wiimoteNumber);
Setting bindZR = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_ZR + wiimoteNumber);
Setting bindMinus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_MINUS + wiimoteNumber);
Setting bindPlus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_PLUS + wiimoteNumber);
Setting bindHome = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_HOME + wiimoteNumber);
Setting bindLeftUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_UP + wiimoteNumber);
Setting bindLeftDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_DOWN + wiimoteNumber);
Setting bindLeftLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_LEFT + wiimoteNumber);
Setting bindLeftRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_RIGHT + wiimoteNumber);
Setting bindRightUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_UP + wiimoteNumber);
Setting bindRightDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_DOWN + wiimoteNumber);
Setting bindRightLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_LEFT + wiimoteNumber);
Setting bindRightRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_RIGHT + wiimoteNumber);
Setting bindL = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_TRIGGER_L + wiimoteNumber);
Setting bindR = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_TRIGGER_R + wiimoteNumber);
Setting bindDpadUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_UP + wiimoteNumber);
Setting bindDpadDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_DOWN + wiimoteNumber);
Setting bindDpadLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_LEFT + wiimoteNumber);
Setting bindDpadRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_RIGHT + wiimoteNumber);
sl.add(new HeaderSetting(null, null, R.string.generic_buttons, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_A + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_a, bindA));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_B + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_b, bindB));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_X + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_x, bindX));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_Y + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_y, bindY));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_ZL + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.classic_button_zl, bindZL));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_ZR + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.classic_button_zr, bindZR));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_MINUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_minus, bindMinus));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_PLUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_plus, bindPlus));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_HOME + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_home, bindHome));
sl.add(new HeaderSetting(null, null, R.string.classic_leftstick, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindLeftUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindLeftDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindLeftLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindLeftRight));
sl.add(new HeaderSetting(null, null, R.string.classic_rightstick, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindRightUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindRightDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindRightLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindRightRight));
sl.add(new HeaderSetting(null, null, R.string.controller_trig, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_TRIGGER_L + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.trigger_left, bindR));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_TRIGGER_R + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.trigger_right, bindL));
sl.add(new HeaderSetting(null, null, R.string.controller_dpad, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindDpadUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindDpadDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindDpadLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindDpadRight));
break;
case 3: // Guitar
Setting bindFretGreen = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_GREEN + wiimoteNumber);
Setting bindFretRed = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_RED + wiimoteNumber);
Setting bindFretYellow = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_YELLOW + wiimoteNumber);
Setting bindFretBlue = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_BLUE + wiimoteNumber);
Setting bindFretOrange = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_ORANGE + wiimoteNumber);
Setting bindStrumUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_STRUM_UP + wiimoteNumber);
Setting bindStrumDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_STRUM_DOWN + wiimoteNumber);
Setting bindGuitarMinus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_MINUS + wiimoteNumber);
Setting bindGuitarPlus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_PLUS + wiimoteNumber);
Setting bindGuitarUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_STICK_UP + wiimoteNumber);
Setting bindGuitarDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_STICK_DOWN + wiimoteNumber);
Setting bindGuitarLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_STICK_LEFT + wiimoteNumber);
Setting bindGuitarRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_STICK_RIGHT + wiimoteNumber);
Setting bindWhammyBar = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_GUITAR_WHAMMY_BAR + wiimoteNumber);
sl.add(new HeaderSetting(null, null, R.string.guitar_frets, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_GREEN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_green, bindFretGreen));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_RED + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_red, bindFretRed));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_YELLOW + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_yellow, bindFretYellow));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_BLUE + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_blue, bindFretBlue));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_FRET_ORANGE + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_orange, bindFretOrange));
sl.add(new HeaderSetting(null, null, R.string.guitar_strum, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_STRUM_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindStrumUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_STRUM_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindStrumDown));
sl.add(new HeaderSetting(null, null, R.string.generic_buttons, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_MINUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_minus, bindGuitarMinus));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_PLUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_plus, bindGuitarPlus));
sl.add(new HeaderSetting(null, null, R.string.generic_stick, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_STICK_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindGuitarUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_STICK_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindGuitarDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_STICK_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindGuitarLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_STICK_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindGuitarRight));
sl.add(new HeaderSetting(null, null, R.string.guitar_whammy, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_GUITAR_WHAMMY_BAR + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindWhammyBar));
break;
case 4: // Drums
Setting bindPadRed = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_RED + wiimoteNumber);
Setting bindPadYellow = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_YELLOW + wiimoteNumber);
Setting bindPadBlue = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_BLUE + wiimoteNumber);
Setting bindPadGreen = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_GREEN + wiimoteNumber);
Setting bindPadOrange = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_ORANGE + wiimoteNumber);
Setting bindPadBass = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_BASS + wiimoteNumber);
Setting bindDrumsUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_STICK_UP + wiimoteNumber);
Setting bindDrumsDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_STICK_DOWN + wiimoteNumber);
Setting bindDrumsLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_STICK_LEFT + wiimoteNumber);
Setting bindDrumsRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_STICK_RIGHT + wiimoteNumber);
Setting bindDrumsMinus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_MINUS + wiimoteNumber);
Setting bindDrumsPlus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_DRUMS_PLUS + wiimoteNumber);
sl.add(new HeaderSetting(null, null, R.string.drums_pads, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_RED + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_red, bindPadRed));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_YELLOW + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_yellow, bindPadYellow));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_BLUE + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_blue, bindPadBlue));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_GREEN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_green, bindPadGreen));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_ORANGE + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_orange, bindPadOrange));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_PAD_BASS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.drums_pad_bass, bindPadBass));
sl.add(new HeaderSetting(null, null, R.string.generic_stick, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_STICK_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindDrumsUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_STICK_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindDrumsDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_STICK_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindDrumsLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_STICK_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindDrumsRight));
sl.add(new HeaderSetting(null, null, R.string.generic_buttons, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_MINUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_minus, bindDrumsMinus));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_DRUMS_PLUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_plus, bindDrumsPlus));
break;
case 5: // Turntable
Setting bindGreenLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_GREEN_LEFT + wiimoteNumber);
Setting bindRedLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_RED_LEFT + wiimoteNumber);
Setting bindBlueLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_BLUE_LEFT + wiimoteNumber);
Setting bindGreenRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_GREEN_RIGHT + wiimoteNumber);
Setting bindRedRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_RED_RIGHT + wiimoteNumber);
Setting bindBlueRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_BLUE_RIGHT + wiimoteNumber);
Setting bindTurntableMinus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_MINUS + wiimoteNumber);
Setting bindTurntablePlus = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_PLUS + wiimoteNumber);
Setting bindEuphoria = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_EUPHORIA + wiimoteNumber);
Setting bindTurntableLeftLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_LEFT_LEFT + wiimoteNumber);
Setting bindTurntableLeftRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_LEFT_RIGHT + wiimoteNumber);
Setting bindTurntableRightLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_RIGHT_LEFT + wiimoteNumber);
Setting bindTurntableRightRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_RIGHT_RIGHT + wiimoteNumber);
Setting bindTurntableUp = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_UP + wiimoteNumber);
Setting bindTurntableDown = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_DOWN + wiimoteNumber);
Setting bindTurntableLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_LEFT + wiimoteNumber);
Setting bindTurntableRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_RIGHT + wiimoteNumber);
Setting bindEffectDial = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_EFFECT_DIAL + wiimoteNumber);
Setting bindCrossfadeLeft = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_CROSSFADE_LEFT + wiimoteNumber);
Setting bindCrossfadeRight = mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_BINDINGS).getSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_CROSSFADE_RIGHT + wiimoteNumber);
sl.add(new HeaderSetting(null, null, R.string.generic_buttons, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_GREEN_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.turntable_button_green_left, bindGreenLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_RED_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.turntable_button_red_left, bindRedLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_BLUE_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.turntable_button_blue_left, bindBlueLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_GREEN_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.turntable_button_green_right, bindGreenRight));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_RED_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.turntable_button_red_right, bindRedRight));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_BLUE_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.turntable_button_blue_right, bindBlueRight));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_MINUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_minus, bindTurntableMinus));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_PLUS + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.button_plus, bindTurntablePlus));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_EUPHORIA + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.turntable_button_euphoria, bindEuphoria));
sl.add(new HeaderSetting(null, null, R.string.turntable_table_left, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_LEFT_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindTurntableLeftLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_LEFT_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindTurntableLeftRight));
sl.add(new HeaderSetting(null, null, R.string.turntable_table_right, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_RIGHT_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindTurntableRightLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_RIGHT_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindTurntableRightRight));
sl.add(new HeaderSetting(null, null, R.string.generic_stick, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_UP + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_up, bindTurntableUp));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_DOWN + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_down, bindTurntableDown));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindTurntableLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindTurntableRight));
sl.add(new HeaderSetting(null, null, R.string.turntable_effect, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_EFFECT_DIAL + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.turntable_effect_dial, bindEffectDial));
sl.add(new HeaderSetting(null, null, R.string.turntable_crossfade, 0));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_CROSSFADE_LEFT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_left, bindCrossfadeLeft));
sl.add(new InputBindingSetting(SettingsFile.KEY_WIIBIND_TURNTABLE_CROSSFADE_RIGHT + wiimoteNumber, SettingsFile.SECTION_BINDINGS, SettingsFile.SETTINGS_DOLPHIN, R.string.generic_right, bindCrossfadeRight));
break;
}
}
private boolean getInvertedBooleanValue(int file, String section, String key, boolean defaultValue)
@ -313,15 +793,25 @@ public final class SettingsFragmentPresenter
{
String videoBackend = ((StringSetting)mSettings.get(SettingsFile.SETTINGS_DOLPHIN).get(SettingsFile.SECTION_CORE).getSetting(SettingsFile.KEY_VIDEO_BACKEND)).getValue();
if (videoBackend.equals("OGL"))
{
videoBackendValue = 0;
}
else if (videoBackend.equals("Vulkan"))
{
videoBackendValue = 1;
}
else if (videoBackend.equals("Software"))
{
videoBackendValue = 2;
}
else if (videoBackend.equals("Null"))
{
videoBackendValue = 3;
}
else
{
videoBackendValue = 0;
}
}
catch (NullPointerException ex)
{
@ -360,5 +850,48 @@ public final class SettingsFragmentPresenter
return xfbValue;
}
}
private int getExtensionValue(int wiimoteNumber)
{
int extensionValue;
try
{
String extension = ((StringSetting)mSettings.get(SettingsFile.SETTINGS_WIIMOTE).get(SettingsFile.SECTION_WIIMOTE + wiimoteNumber).getSetting(SettingsFile.KEY_WIIMOTE_EXTENSION)).getValue();
if (extension.equals("None"))
{
extensionValue = 0;
}
else if (extension.equals("Nunchuk"))
{
extensionValue = 1;
}
else if (extension.equals("Classic"))
{
extensionValue = 2;
}
else if (extension.equals("Guitar"))
{
extensionValue = 3;
}
else if (extension.equals("Drums"))
{
extensionValue = 4;
}
else if (extension.equals("Turntable"))
{
extensionValue = 5;
}
else
{
extensionValue = 0;
}
}
catch (NullPointerException ex)
{
extensionValue = 0;
}
return extensionValue;
}
}

View File

@ -93,4 +93,12 @@ public interface SettingsFragmentView
* @param value New setting for the Wiimote.
*/
void onWiimoteSettingChanged(String section, int value);
/**
* Have the fragment tell the containing Activity that an extension setting was modified.
*
* @param key Identifier for the extension that was modified.
* @param value New setting for the extension.
*/
void onExtensionSettingChanged(String key, int value);
}

View File

@ -45,6 +45,8 @@ public final class SettingsFile
public static final String SECTION_WIIMOTE = "Wiimote";
public static final String SECTION_BINDINGS = "Android";
public static final String KEY_CPU_CORE = "CPUCore";
public static final String KEY_DUAL_CORE = "CPUThread";
public static final String KEY_OVERCLOCK_ENABLE = "OverclockEnable";
@ -77,10 +79,154 @@ public final class SettingsFile
public static final String KEY_GCPAD_TYPE = "SIDevice";
public static final String KEY_GCBIND_A = "InputA_";
public static final String KEY_GCBIND_B = "InputB_";
public static final String KEY_GCBIND_X = "InputX_";
public static final String KEY_GCBIND_Y = "InputY_";
public static final String KEY_GCBIND_Z = "InputZ_";
public static final String KEY_GCBIND_START = "InputStart_";
public static final String KEY_GCBIND_CONTROL_UP = "MainUp_";
public static final String KEY_GCBIND_CONTROL_DOWN = "MainDown_";
public static final String KEY_GCBIND_CONTROL_LEFT = "MainLeft_";
public static final String KEY_GCBIND_CONTROL_RIGHT = "MainRight_";
public static final String KEY_GCBIND_C_UP = "CStickUp_";
public static final String KEY_GCBIND_C_DOWN = "CStickDown_";
public static final String KEY_GCBIND_C_LEFT = "CStickLeft_";
public static final String KEY_GCBIND_C_RIGHT = "CStickRight_";
public static final String KEY_GCBIND_TRIGGER_L = "InputL_";
public static final String KEY_GCBIND_TRIGGER_R = "InputR_";
public static final String KEY_GCBIND_DPAD_UP = "DPadUp_";
public static final String KEY_GCBIND_DPAD_DOWN = "DPadDown_";
public static final String KEY_GCBIND_DPAD_LEFT = "DPadLeft_";
public static final String KEY_GCBIND_DPAD_RIGHT = "DPadRight_";
public static final String KEY_GCADAPTER_RUMBLE = "AdapterRumble";
public static final String KEY_GCADAPTER_BONGOS = "SimulateKonga";
public static final String KEY_WIIMOTE_TYPE = "Source";
public static final String KEY_WIIMOTE_EXTENSION = "Extension";
public static final String KEY_WIIBIND_A = "WiimoteA_";
public static final String KEY_WIIBIND_B = "WiimoteB_";
public static final String KEY_WIIBIND_1 = "Wiimote1_";
public static final String KEY_WIIBIND_2 = "Wiimote2_";
public static final String KEY_WIIBIND_MINUS = "WiimoteMinus_";
public static final String KEY_WIIBIND_PLUS = "WiimotePlus_";
public static final String KEY_WIIBIND_HOME = "WiimoteHome_";
public static final String KEY_WIIBIND_IR_UP = "IRUp_";
public static final String KEY_WIIBIND_IR_DOWN = "IRDown_";
public static final String KEY_WIIBIND_IR_LEFT = "IRLeft_";
public static final String KEY_WIIBIND_IR_RIGHT = "IRRight_";
public static final String KEY_WIIBIND_IR_FORWARD = "IRForward_";
public static final String KEY_WIIBIND_IR_BACKWARD = "IRBackward_";
public static final String KEY_WIIBIND_IR_HIDE = "IRHide_";
public static final String KEY_WIIBIND_SWING_UP = "SwingUp_";
public static final String KEY_WIIBIND_SWING_DOWN = "SwingDown_";
public static final String KEY_WIIBIND_SWING_LEFT = "SwingLeft_";
public static final String KEY_WIIBIND_SWING_RIGHT = "SwingRight_";
public static final String KEY_WIIBIND_SWING_FORWARD = "SwingForward_";
public static final String KEY_WIIBIND_SWING_BACKWARD = "SwingBackward_";
public static final String KEY_WIIBIND_TILT_FORWARD = "TiltForward_";
public static final String KEY_WIIBIND_TILT_BACKWARD = "TiltBackward_";
public static final String KEY_WIIBIND_TILT_LEFT = "TiltLeft_";
public static final String KEY_WIIBIND_TILT_RIGHT = "TiltRight_";
public static final String KEY_WIIBIND_TILT_MODIFIER = "TiltModifier_";
public static final String KEY_WIIBIND_SHAKE_X = "ShakeX_";
public static final String KEY_WIIBIND_SHAKE_Y = "ShakeY_";
public static final String KEY_WIIBIND_SHAKE_Z = "ShakeZ_";
public static final String KEY_WIIBIND_DPAD_UP = "WiimoteUp_";
public static final String KEY_WIIBIND_DPAD_DOWN = "WiimoteDown_";
public static final String KEY_WIIBIND_DPAD_LEFT = "WiimoteLeft_";
public static final String KEY_WIIBIND_DPAD_RIGHT = "WiimoteRight_";
public static final String KEY_WIIBIND_NUNCHUK_C = "NunchukC_";
public static final String KEY_WIIBIND_NUNCHUK_Z = "NunchukZ_";
public static final String KEY_WIIBIND_NUNCHUK_UP = "NunchukUp_";
public static final String KEY_WIIBIND_NUNCHUK_DOWN = "NunchukDown_";
public static final String KEY_WIIBIND_NUNCHUK_LEFT = "NunchukLeft_";
public static final String KEY_WIIBIND_NUNCHUK_RIGHT = "NunchukRight_";
public static final String KEY_WIIBIND_NUNCHUK_SWING_UP = "NunchukSwingUp_";
public static final String KEY_WIIBIND_NUNCHUK_SWING_DOWN = "NunchukSwingDown_";
public static final String KEY_WIIBIND_NUNCHUK_SWING_LEFT = "NunchukSwingLeft_";
public static final String KEY_WIIBIND_NUNCHUK_SWING_RIGHT = "NunchukSwingRight_";
public static final String KEY_WIIBIND_NUNCHUK_SWING_FORWARD = "NunchukSwingForward_";
public static final String KEY_WIIBIND_NUNCHUK_SWING_BACKWARD = "NunchukSwingBackward_";
public static final String KEY_WIIBIND_NUNCHUK_TILT_FORWARD = "NunchukTiltForward_";
public static final String KEY_WIIBIND_NUNCHUK_TILT_BACKWARD = "NunchukTiltBackward_";
public static final String KEY_WIIBIND_NUNCHUK_TILT_LEFT = "NunchukTiltLeft_";
public static final String KEY_WIIBIND_NUNCHUK_TILT_RIGHT = "NunchukTiltRight_";
public static final String KEY_WIIBIND_NUNCHUK_TILT_MODIFIER = "NunchukTiltModifier_";
public static final String KEY_WIIBIND_NUNCHUK_SHAKE_X = "NunchukShakeX_";
public static final String KEY_WIIBIND_NUNCHUK_SHAKE_Y = "NunchukShakeY_";
public static final String KEY_WIIBIND_NUNCHUK_SHAKE_Z = "NunchukShakeZ_";
public static final String KEY_WIIBIND_CLASSIC_A = "ClassicA_";
public static final String KEY_WIIBIND_CLASSIC_B = "ClassicB_";
public static final String KEY_WIIBIND_CLASSIC_X = "ClassicX_";
public static final String KEY_WIIBIND_CLASSIC_Y = "ClassicY_";
public static final String KEY_WIIBIND_CLASSIC_ZL = "ClassicZL_";
public static final String KEY_WIIBIND_CLASSIC_ZR = "ClassicZR_";
public static final String KEY_WIIBIND_CLASSIC_MINUS = "ClassicMinus_";
public static final String KEY_WIIBIND_CLASSIC_PLUS = "ClassicPlus_";
public static final String KEY_WIIBIND_CLASSIC_HOME = "ClassicHome_";
public static final String KEY_WIIBIND_CLASSIC_LEFT_UP = "ClassicLeftStickUp_";
public static final String KEY_WIIBIND_CLASSIC_LEFT_DOWN = "ClassicLeftStickDown_";
public static final String KEY_WIIBIND_CLASSIC_LEFT_LEFT = "ClassicLeftStickLeft_";
public static final String KEY_WIIBIND_CLASSIC_LEFT_RIGHT = "ClassicLeftStickRight_";
public static final String KEY_WIIBIND_CLASSIC_RIGHT_UP = "ClassicRightStickUp_";
public static final String KEY_WIIBIND_CLASSIC_RIGHT_DOWN = "ClassicRightStickDown_";
public static final String KEY_WIIBIND_CLASSIC_RIGHT_LEFT = "ClassicRightStickLeft_";
public static final String KEY_WIIBIND_CLASSIC_RIGHT_RIGHT = "ClassicRightStickRight_";
public static final String KEY_WIIBIND_CLASSIC_TRIGGER_L = "ClassicTriggerL_";
public static final String KEY_WIIBIND_CLASSIC_TRIGGER_R = "ClassicTriggerR_";
public static final String KEY_WIIBIND_CLASSIC_DPAD_UP = "ClassicUp_";
public static final String KEY_WIIBIND_CLASSIC_DPAD_DOWN = "ClassicDown_";
public static final String KEY_WIIBIND_CLASSIC_DPAD_LEFT = "ClassicLeft_";
public static final String KEY_WIIBIND_CLASSIC_DPAD_RIGHT = "ClassicRight_";
public static final String KEY_WIIBIND_GUITAR_FRET_GREEN = "GuitarGreen_";
public static final String KEY_WIIBIND_GUITAR_FRET_RED = "GuitarRed_";
public static final String KEY_WIIBIND_GUITAR_FRET_YELLOW = "GuitarYellow_";
public static final String KEY_WIIBIND_GUITAR_FRET_BLUE = "GuitarBlue_";
public static final String KEY_WIIBIND_GUITAR_FRET_ORANGE = "GuitarOrange_";
public static final String KEY_WIIBIND_GUITAR_STRUM_UP = "GuitarStrumUp_";
public static final String KEY_WIIBIND_GUITAR_STRUM_DOWN = "GuitarStrumDown_";
public static final String KEY_WIIBIND_GUITAR_MINUS = "GuitarMinus_";
public static final String KEY_WIIBIND_GUITAR_PLUS = "GuitarPlus_";
public static final String KEY_WIIBIND_GUITAR_STICK_UP = "GuitarUp_";
public static final String KEY_WIIBIND_GUITAR_STICK_DOWN = "GuitarDown_";
public static final String KEY_WIIBIND_GUITAR_STICK_LEFT = "GuitarLeft_";
public static final String KEY_WIIBIND_GUITAR_STICK_RIGHT = "GuitarRight_";
public static final String KEY_WIIBIND_GUITAR_WHAMMY_BAR = "GuitarWhammy_";
public static final String KEY_WIIBIND_DRUMS_PAD_RED = "DrumsRed_";
public static final String KEY_WIIBIND_DRUMS_PAD_YELLOW = "DrumsYellow_";
public static final String KEY_WIIBIND_DRUMS_PAD_BLUE = "DrumsBlue_";
public static final String KEY_WIIBIND_DRUMS_PAD_GREEN = "DrumsGreen_";
public static final String KEY_WIIBIND_DRUMS_PAD_ORANGE = "DrumsOrange_";
public static final String KEY_WIIBIND_DRUMS_PAD_BASS = "DrumsBass_";
public static final String KEY_WIIBIND_DRUMS_MINUS = "DrumsMinus_";
public static final String KEY_WIIBIND_DRUMS_PLUS = "DrumsPlus_";
public static final String KEY_WIIBIND_DRUMS_STICK_UP = "DrumsUp_";
public static final String KEY_WIIBIND_DRUMS_STICK_DOWN = "DrumsDown_";
public static final String KEY_WIIBIND_DRUMS_STICK_LEFT = "DrumsLeft_";
public static final String KEY_WIIBIND_DRUMS_STICK_RIGHT = "DrumsRight_";
public static final String KEY_WIIBIND_TURNTABLE_GREEN_LEFT = "TurntableGreenLeft_";
public static final String KEY_WIIBIND_TURNTABLE_RED_LEFT = "TurntableRedLeft_";
public static final String KEY_WIIBIND_TURNTABLE_BLUE_LEFT = "TurntableBlueLeft_";
public static final String KEY_WIIBIND_TURNTABLE_GREEN_RIGHT = "TurntableGreenRight_";
public static final String KEY_WIIBIND_TURNTABLE_RED_RIGHT = "TurntableRedRight_";
public static final String KEY_WIIBIND_TURNTABLE_BLUE_RIGHT = "TurntableBlueRight_";
public static final String KEY_WIIBIND_TURNTABLE_MINUS = "TurntableMinus_";
public static final String KEY_WIIBIND_TURNTABLE_PLUS = "TurntablePlus_";
public static final String KEY_WIIBIND_TURNTABLE_EUPHORIA = "TurntableEuphoria_";
public static final String KEY_WIIBIND_TURNTABLE_LEFT_LEFT = "TurntableLeftLeft_";
public static final String KEY_WIIBIND_TURNTABLE_LEFT_RIGHT = "TurntableLeftRight_";
public static final String KEY_WIIBIND_TURNTABLE_RIGHT_LEFT = "TurntableRightLeft_";
public static final String KEY_WIIBIND_TURNTABLE_RIGHT_RIGHT = "TurntableRightRight_";
public static final String KEY_WIIBIND_TURNTABLE_STICK_UP = "TurntableUp_";
public static final String KEY_WIIBIND_TURNTABLE_STICK_DOWN = "TurntableDown_";
public static final String KEY_WIIBIND_TURNTABLE_STICK_LEFT = "TurntableLeft_";
public static final String KEY_WIIBIND_TURNTABLE_STICK_RIGHT = "TurntableRight_";
public static final String KEY_WIIBIND_TURNTABLE_EFFECT_DIAL = "TurntableEffDial_";
public static final String KEY_WIIBIND_TURNTABLE_CROSSFADE_LEFT = "TurntableCrossLeft_";
public static final String KEY_WIIBIND_TURNTABLE_CROSSFADE_RIGHT = "TurntableCrossRight_";
public static final String KEY_WIIMOTE_SCAN = "WiimoteContinuousScanning";
public static final String KEY_WIIMOTE_SPEAKER = "WiimoteEnableSpeaker";

View File

@ -34,7 +34,7 @@
</integer-array>
<!-- Wii Remote extensions -->
<string-array name="wiimoteExtensions" translatable="false">
<string-array name="wiimoteExtensionsEntries" translatable="false">
<item>None</item>
<item>Nunchuk</item>
<item>Classic</item>
@ -42,6 +42,14 @@
<item>Drums</item>
<item>Turntable</item>
</string-array>
<integer-array name="wiimoteExtensionsValues" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</integer-array>
<!-- Texture Cache Accuracy Preference -->
<string-array name="textureCacheAccuracyEntries" translatable="false">

View File

@ -12,12 +12,10 @@
<string name="controller_3">GameCube Controller 4</string>
<!-- END WARNING -->
<string name="enable_controller">Enable controller</string>
<string name="controller_buttons">Buttons</string>
<string name="controller_dpad">Directional Keys</string>
<string name="controller_main">Main Stick Navigation</string>
<string name="controller_c">C-Stick Navigation</string>
<string name="controller_trig">Analog Triggers</string>
<string name="controller_control">Control Stick</string>
<string name="controller_c">C Stick</string>
<string name="controller_trig">Triggers</string>
<string name="controller_dpad">D-Pad</string>
<string name="modifier_range">Modifier Range</string>
<string name="analog_radius">Analog Radius (High value = High sensitivity)</string>
<string name="analog_threshold">Analog Threshold (Low value = High sensitivity)</string>
@ -30,113 +28,71 @@
<string name="wiimote_3">Wii Remote 4</string>
<!-- END WARNING -->
<string name="enable_wiimote">Enable Wii Remote</string>
<string name="wiimote_ir">IR Motion Controls</string>
<string name="wiimote_swing">Swing Navigation</string>
<string name="wiimote_tilt">Tilt Navigation</string>
<string name="wiimote_shake">Shake Controls</string>
<string name="wiimote_stick">Analog Stick Navigation</string>
<string name="wiimote_extensions">Wii Remote Extension</string>
<string name="wiimote_extensions_descrip">Choose which Extension you want to use with the Wiimote</string>
<string name="show_nunchuk">Nunchuk</string>
<string name="show_classic">Classic Controller</string>
<string name="show_guitar">Guitar</string>
<string name="show_drums">Drums</string>
<string name="show_turntable">Turntable</string>
<string name="wiimote_extensions">Extension</string>
<string name="wiimote_extensions_descrip">Choose and bind the Wii Remote extension.</string>
<string name="wiimote_ir">IR</string>
<string name="wiimote_swing">Swing</string>
<string name="wiimote_tilt">Tilt</string>
<string name="wiimote_shake">Shake</string>
<string name="input_binding">Input Binding</string>
<string name="input_binding_descrip">Press or move an input to bind it to %1$s.</string>
<!-- GameCube buttons (May be shared with Wii Remote stuff too) -->
<string name="button_a">Button A</string>
<string name="button_b">Button B</string>
<string name="button_start">Button Start</string>
<string name="button_x">Button X</string>
<string name="button_y">Button Y</string>
<string name="button_z">Button Z</string>
<string name="dpad_up">D-Pad Up</string>
<string name="dpad_down">D-Pad Down</string>
<string name="dpad_left">D-Pad Left</string>
<string name="dpad_right">D-Pad Right</string>
<string name="main_stick_up">Control Stick Up</string>
<string name="main_stick_down">Control Stick Down</string>
<string name="main_stick_left">Control Stick Left</string>
<string name="main_stick_right">Control Stick Right</string>
<string name="c_stick_up">C Stick Up</string>
<string name="c_stick_down">C Stick Down</string>
<string name="c_stick_left">C Stick Left</string>
<string name="c_stick_right">C Stick Right</string>
<string name="trigger_left">Trigger L</string>
<string name="trigger_right">Trigger R</string>
<!-- Generic buttons (Shared with lots of stuff) -->
<string name="generic_buttons">Buttons</string>
<string name="generic_up">Up</string>
<string name="generic_down">Down</string>
<string name="generic_left">Left</string>
<string name="generic_right">Right</string>
<string name="generic_forward">Forward</string>
<string name="generic_backward">Backward</string>
<string name="generic_stick">Stick</string>
<string name="generic_green">Green</string>
<string name="generic_red">Red</string>
<string name="generic_yellow">Yellow</string>
<string name="generic_blue">Blue</string>
<string name="generic_orange">Orange</string>
<!-- Wii Remote (+ extension) only buttons -->
<string name="button_one">Button 1</string>
<string name="button_two">Button 2</string>
<string name="button_plus">Button +</string>
<string name="button_minus">Button -</string>
<string name="button_home">Button Home</string>
<string name="stick_up">Stick Up</string>
<string name="stick_down">Stick Down</string>
<string name="stick_left">Stick Left</string>
<string name="stick_right">Stick Right</string>
<string name="ir_up">IR Up</string>
<string name="ir_down">IR Down</string>
<string name="ir_left">IR Left</string>
<string name="ir_right">IR Right</string>
<string name="ir_forward">IR Forward</string>
<string name="ir_backward">IR Backward</string>
<string name="ir_hide">IR Hide</string>
<string name="swing_up">Swing Up</string>
<string name="swing_down">Swing Down</string>
<string name="swing_left">Swing Left</string>
<string name="swing_right">Swing Right</string>
<string name="swing_forward">Swing Forward</string>
<string name="swing_backward">Swing Backward</string>
<string name="tilt_forward">Tilt Forward</string>
<string name="tilt_backward">Tilt Backward</string>
<string name="tilt_left">Tilt Left</string>
<string name="tilt_right">Tilt Right</string>
<string name="tilt_modifier">Tilt Modifier</string>
<string name="shake_x">Shake X</string>
<string name="shake_y">Shake Y</string>
<string name="shake_z">Shake Z</string>
<!-- GameCube buttons (May be shared with other stuff too) -->
<string name="button_a">A</string>
<string name="button_b">B</string>
<string name="button_start">Start</string>
<string name="button_x">X</string>
<string name="button_y">Y</string>
<string name="button_z">Z</string>
<string name="trigger_left">L</string>
<string name="trigger_right">R</string>
<!-- Wii Remote buttons (May be shared with other stuff too) -->
<string name="button_one">1</string>
<string name="button_two">2</string>
<string name="button_minus">-</string>
<string name="button_plus">+</string>
<string name="button_home">Home</string>
<string name="ir_hide">Hide</string>
<string name="tilt_modifier">Modifier</string>
<string name="shake_x">X</string>
<string name="shake_y">Y</string>
<string name="shake_z">Z</string>
<!-- Nunchuk only buttons -->
<string name="nunchuk_button_c">Button C</string>
<string name="nunchuk_button_c">C</string>
<!-- Classic only buttons -->
<string name="classic_button_zl">Button ZL</string>
<string name="classic_button_zr">Button ZR</string>
<string name="classic_leftstick">Left Analog Stick Navigation</string>
<string name="classic_stick_left_up">Left Stick Up</string>
<string name="classic_stick_left_down">Left Stick Down</string>
<string name="classic_stick_left_left">Left Stick Left</string>
<string name="classic_stick_left_right">Left Stick Right</string>
<string name="classic_rightstick">Right Analog Stick Navigation</string>
<string name="classic_stick_right_up">Right Stick Up</string>
<string name="classic_stick_right_down">Right Stick Down</string>
<string name="classic_stick_right_left">Right Stick Left</string>
<string name="classic_stick_right_right">Right Stick Right</string>
<string name="classic_button_zl">ZL</string>
<string name="classic_button_zr">ZR</string>
<string name="classic_leftstick">Left Stick</string>
<string name="classic_rightstick">Right Stick</string>
<!-- Guitar only buttons -->
<string name="guitar_frets">Guitar Frets</string>
<string name="guitar_fret_green">Red Fret</string>
<string name="guitar_fret_red">Red Fret</string>
<string name="guitar_fret_yellow">Yellow Fret</string>
<string name="guitar_fret_blue">Blue Fret</string>
<string name="guitar_fret_orange">Orange Fret</string>
<string name="guitar_strum_up">Strum Up</string>
<string name="guitar_strum_down">Strum Down</string>
<string name="guitar_whammy">Guitar Whammy</string>
<string name="guitar_whammy_bar">Whammy Bar</string>
<string name="guitar_frets">Frets</string>
<string name="guitar_strum">Strum</string>
<string name="guitar_whammy">Whammy</string>
<string name="guitar_whammy_bar">Bar</string>
<!-- Drums only buttons -->
<string name="drums_pads">Drum Pads</string>
<string name="drums_pad_red">Red Pad</string>
<string name="drums_pad_yellow">Yellow Pad</string>
<string name="drums_pad_blue">Blue Pad</string>
<string name="drums_pad_green">Green Pad</string>
<string name="drums_pad_orange">Orange Pad</string>
<string name="drums_pad_bass">Bass Pad</string>
<string name="drums_pads">Pads</string>
<string name="drums_pad_bass">Bass</string>
<!-- Turntable only buttons -->
<string name="turntable_button_green_left">Green Left</string>
@ -146,17 +102,11 @@
<string name="turntable_button_red_right">Red Right</string>
<string name="turntable_button_blue_right">Blue Right</string>
<string name="turntable_button_euphoria">Euphoria</string>
<string name="turntable_table_left">Left Turntable</string>
<string name="turntable_table_left_left">Left Table Left</string>
<string name="turntable_table_left_right">Left Table Right</string>
<string name="turntable_table_right">Right Turntable</string>
<string name="turntable_table_right_left">Right Table Left</string>
<string name="turntable_table_right_right">Right Table Right</string>
<string name="turntable_effect"> Effects</string>
<string name="turntable_effect_dial">Effect Dial</string>
<string name="turntable_table_left">Table Left</string>
<string name="turntable_table_right">Table Right</string>
<string name="turntable_effect">Effect</string>
<string name="turntable_effect_dial">Dial</string>
<string name="turntable_crossfade">Crossfade</string>
<string name="turntable_crossfade_left">Crossfade Left</string>
<string name="turntable_crossfade_right">Crossfade Right</string>
<!-- CPU Preference Fragment -->
<string name="cpu_core">CPU Core</string>