diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/MotionAlertDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/MotionAlertDialog.java index b0316f94cc..a111155181 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/MotionAlertDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/MotionAlertDialog.java @@ -12,7 +12,6 @@ import androidx.appcompat.app.AlertDialog; import org.dolphinemu.dolphinemu.features.settings.model.view.InputBindingSetting; import org.dolphinemu.dolphinemu.features.settings.ui.SettingsAdapter; -import org.dolphinemu.dolphinemu.utils.ControllerMappingHelper; import org.dolphinemu.dolphinemu.utils.Log; import java.util.ArrayList; @@ -50,7 +49,7 @@ public final class MotionAlertDialog extends AlertDialog Log.debug("[MotionAlertDialog] Received key event: " + event.getAction()); if (event.getAction() == KeyEvent.ACTION_UP) { - if (!ControllerMappingHelper.shouldKeyBeIgnored(event.getDevice(), keyCode)) + if (true) { setting.onKeyInput(mAdapter.getSettings(), event); dismiss(); @@ -116,8 +115,7 @@ public final class MotionAlertDialog extends AlertDialog { InputDevice.MotionRange range = motionRanges.get(i); int axis = range.getAxis(); - float origValue = event.getAxisValue(axis); - float value = ControllerMappingHelper.scaleAxis(input, axis, origValue); + float value = event.getAxisValue(axis); if (firstEvent) { mPreviousValues.add(value); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/LegacyFloatSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/LegacyFloatSetting.java deleted file mode 100644 index 0b92cba802..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/LegacyFloatSetting.java +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later - -package org.dolphinemu.dolphinemu.features.settings.model; - -import androidx.annotation.NonNull; - -public class LegacyFloatSetting extends AbstractLegacySetting implements AbstractFloatSetting -{ - private final float mDefaultValue; - - public LegacyFloatSetting(String file, String section, String key, float defaultValue) - { - super(file, section, key); - mDefaultValue = defaultValue; - } - - @Override - public float getFloat(@NonNull Settings settings) - { - return settings.getSection(mFile, mSection).getFloat(mKey, mDefaultValue); - } - - @Override - public void setFloat(@NonNull Settings settings, float newValue) - { - settings.getSection(mFile, mSection).setFloat(mKey, newValue); - } -} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.java index ebdaf70691..7d3d5a5b19 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.java @@ -24,7 +24,6 @@ public class Settings implements Closeable public static final String FILE_SYSCONF = "SYSCONF"; public static final String FILE_GFX = "GFX"; public static final String FILE_LOGGER = "Logger"; - public static final String FILE_GCPAD = "GCPadNew"; public static final String FILE_WIIMOTE = "WiimoteNew"; public static final String SECTION_INI_ANDROID = "Android"; @@ -46,8 +45,6 @@ public class Settings implements Closeable public static final String SECTION_STEREOSCOPY = "Stereoscopy"; - public static final String SECTION_WIIMOTE = "Wiimote"; - public static final String SECTION_BINDINGS = "Android"; public static final String SECTION_CONTROLS = "Controls"; public static final String SECTION_PROFILE = "Profile"; @@ -64,7 +61,6 @@ public class Settings implements Closeable FILE_WIIMOTE}; private Map mIniFiles = new HashMap<>(); - private final Map mWiimoteProfileFiles = new HashMap<>(); private boolean mLoadedRecursiveIsoPathsValue = false; @@ -99,50 +95,6 @@ public class Settings implements Closeable return mIsWii; } - public IniFile getWiimoteProfile(String profile, int padID) - { - IniFile wiimoteProfileIni = mWiimoteProfileFiles.computeIfAbsent(profile, profileComputed -> - { - IniFile newIni = new IniFile(); - newIni.load(SettingsFile.getWiiProfile(profileComputed), false); - return newIni; - }); - - if (!wiimoteProfileIni.exists(SECTION_PROFILE)) - { - String defaultWiiProfilePath = DirectoryInitialization.getUserDirectory() + - "/Config/Profiles/Wiimote/WiimoteProfile.ini"; - - wiimoteProfileIni.load(defaultWiiProfilePath, false); - - wiimoteProfileIni - .setString(SECTION_PROFILE, "Device", "Android/" + (padID + 4) + "/Touchscreen"); - } - - return wiimoteProfileIni; - } - - public void enableWiimoteProfile(Settings settings, String profile, String profileKey) - { - getWiimoteControlsSection(settings).setString(profileKey, profile); - } - - public boolean disableWiimoteProfile(Settings settings, String profileKey) - { - return getWiimoteControlsSection(settings).delete(profileKey); - } - - public boolean isWiimoteProfileEnabled(Settings settings, String profile, - String profileKey) - { - return profile.equals(getWiimoteControlsSection(settings).getString(profileKey, "")); - } - - private IniFile.Section getWiimoteControlsSection(Settings settings) - { - return settings.getSection(GAME_SETTINGS_PLACEHOLDER_FILE_NAME, SECTION_CONTROLS); - } - public int getWriteLayer() { return isGameSpecific() ? NativeConfig.LAYER_LOCAL_GAME : NativeConfig.LAYER_BASE_OR_CURRENT; @@ -224,7 +176,6 @@ public class Settings implements Closeable { // Notify the native code of the changes to legacy settings NativeLibrary.ReloadConfig(); - NativeLibrary.ReloadWiimoteConfig(); } // LogManager does use the new config system, but doesn't pick up on changes automatically @@ -251,11 +202,6 @@ public class Settings implements Closeable NativeConfig.save(NativeConfig.LAYER_LOCAL_GAME); } - - for (Map.Entry entry : mWiimoteProfileFiles.entrySet()) - { - entry.getValue().save(SettingsFile.getWiiProfile(entry.getKey())); - } } public void clearSettings() diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/WiimoteProfileBooleanSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/WiimoteProfileBooleanSetting.java deleted file mode 100644 index 1705e969c4..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/WiimoteProfileBooleanSetting.java +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later - -package org.dolphinemu.dolphinemu.features.settings.model; - -import androidx.annotation.NonNull; - -import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; - -// This stuff is pretty ugly. It's a kind of workaround for certain controller settings -// not actually being available as game-specific settings. -public class WiimoteProfileBooleanSetting implements AbstractBooleanSetting -{ - private final int mPadID; - - private final String mSection; - private final String mKey; - private final boolean mDefaultValue; - - private final String mProfileKey; - - private final String mProfile; - - public WiimoteProfileBooleanSetting(String gameID, int padID, String section, String key, - boolean defaultValue) - { - mPadID = padID; - mSection = section; - mKey = key; - mDefaultValue = defaultValue; - - mProfileKey = SettingsFile.KEY_WIIMOTE_PROFILE + (padID + 1); - - mProfile = gameID + "_Wii" + padID; - } - - @Override - public boolean isOverridden(@NonNull Settings settings) - { - return settings.isWiimoteProfileEnabled(settings, mProfile, mProfileKey); - } - - @Override - public boolean isRuntimeEditable() - { - return false; - } - - @Override - public boolean delete(@NonNull Settings settings) - { - return settings.disableWiimoteProfile(settings, mProfileKey); - } - - @Override - public boolean getBoolean(@NonNull Settings settings) - { - if (settings.isWiimoteProfileEnabled(settings, mProfile, mProfileKey)) - return settings.getWiimoteProfile(mProfile, mPadID).getBoolean(mSection, mKey, mDefaultValue); - else - return mDefaultValue; - } - - @Override - public void setBoolean(@NonNull Settings settings, boolean newValue) - { - settings.getWiimoteProfile(mProfile, mPadID).setBoolean(mSection, mKey, newValue); - - settings.enableWiimoteProfile(settings, mProfile, mProfileKey); - } -} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/WiimoteProfileStringSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/WiimoteProfileStringSetting.java deleted file mode 100644 index c62df5638d..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/WiimoteProfileStringSetting.java +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later - -package org.dolphinemu.dolphinemu.features.settings.model; - -import androidx.annotation.NonNull; - -import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; - -// This stuff is pretty ugly. It's a kind of workaround for certain controller settings -// not actually being available as game-specific settings. -public class WiimoteProfileStringSetting implements AbstractStringSetting -{ - private final int mPadID; - - private final String mSection; - private final String mKey; - private final String mDefaultValue; - - private final String mProfileKey; - - private final String mProfile; - - public WiimoteProfileStringSetting(String gameID, int padID, String section, String key, - String defaultValue) - { - mPadID = padID; - mSection = section; - mKey = key; - mDefaultValue = defaultValue; - - mProfileKey = SettingsFile.KEY_WIIMOTE_PROFILE + (padID + 1); - - mProfile = gameID + "_Wii" + padID; - } - - @Override - public boolean isOverridden(@NonNull Settings settings) - { - return settings.isWiimoteProfileEnabled(settings, mProfile, mProfileKey); - } - - @Override - public boolean isRuntimeEditable() - { - return false; - } - - @Override - public boolean delete(@NonNull Settings settings) - { - return settings.disableWiimoteProfile(settings, mProfileKey); - } - - @NonNull @Override - public String getString(@NonNull Settings settings) - { - if (settings.isWiimoteProfileEnabled(settings, mProfile, mProfileKey)) - return settings.getWiimoteProfile(mProfile, mPadID).getString(mSection, mKey, mDefaultValue); - else - return mDefaultValue; - } - - @Override - public void setString(@NonNull Settings settings, @NonNull String newValue) - { - settings.getWiimoteProfile(mProfile, mPadID).setString(mSection, mKey, newValue); - - settings.enableWiimoteProfile(settings, mProfile, mProfileKey); - } -} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java index 3604d53087..9d1a783979 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java @@ -16,36 +16,30 @@ import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.activities.UserDataActivity; import org.dolphinemu.dolphinemu.features.settings.model.AbstractBooleanSetting; import org.dolphinemu.dolphinemu.features.settings.model.AbstractIntSetting; -import org.dolphinemu.dolphinemu.features.settings.model.AbstractStringSetting; import org.dolphinemu.dolphinemu.features.settings.model.AdHocBooleanSetting; import org.dolphinemu.dolphinemu.features.settings.model.BooleanSetting; import org.dolphinemu.dolphinemu.features.settings.model.FloatSetting; import org.dolphinemu.dolphinemu.features.settings.model.IntSetting; -import org.dolphinemu.dolphinemu.features.settings.model.LegacyStringSetting; import org.dolphinemu.dolphinemu.features.settings.model.PostProcessing; import org.dolphinemu.dolphinemu.features.settings.model.ScaledIntSetting; import org.dolphinemu.dolphinemu.features.settings.model.Settings; import org.dolphinemu.dolphinemu.features.settings.model.StringSetting; -import org.dolphinemu.dolphinemu.features.settings.model.WiimoteProfileStringSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.DateTimeChoiceSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.SwitchSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.FilePicker; import org.dolphinemu.dolphinemu.features.settings.model.view.HeaderSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.HyperLinkHeaderSetting; -import org.dolphinemu.dolphinemu.features.settings.model.view.InputBindingSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.InputStringSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.IntSliderSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.InvertedSwitchSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.LogSwitchSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.PercentSliderSetting; -import org.dolphinemu.dolphinemu.features.settings.model.view.RumbleBindingSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.RunRunnable; import org.dolphinemu.dolphinemu.features.settings.model.view.SettingsItem; import org.dolphinemu.dolphinemu.features.settings.model.view.SingleChoiceSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.SingleChoiceSettingDynamicDescriptions; import org.dolphinemu.dolphinemu.features.settings.model.view.StringSingleChoiceSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.SubmenuSetting; -import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; import org.dolphinemu.dolphinemu.ui.main.MainPresenter; import org.dolphinemu.dolphinemu.utils.BooleanSupplier; import org.dolphinemu.dolphinemu.utils.EGLHelper; @@ -1079,62 +1073,7 @@ public final class SettingsFragmentPresenter { if (gcPadType == 6) // Emulated { - sl.add(new HeaderSetting(mContext, R.string.generic_buttons, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_A + gcPadNumber, R.string.button_a, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_B + gcPadNumber, R.string.button_b, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_X + gcPadNumber, R.string.button_x, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_Y + gcPadNumber, R.string.button_y, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_Z + gcPadNumber, R.string.button_z, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_START + gcPadNumber, R.string.button_start, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.controller_control, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_CONTROL_UP + gcPadNumber, R.string.generic_up, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_CONTROL_DOWN + gcPadNumber, R.string.generic_down, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_CONTROL_LEFT + gcPadNumber, R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_CONTROL_RIGHT + gcPadNumber, R.string.generic_right, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.controller_c, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_C_UP + gcPadNumber, R.string.generic_up, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_C_DOWN + gcPadNumber, R.string.generic_down, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_C_LEFT + gcPadNumber, R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_C_RIGHT + gcPadNumber, R.string.generic_right, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.controller_trig, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_TRIGGER_L + gcPadNumber, R.string.trigger_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_TRIGGER_R + gcPadNumber, R.string.trigger_right, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.controller_dpad, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_DPAD_UP + gcPadNumber, R.string.generic_up, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_DPAD_DOWN + gcPadNumber, R.string.generic_down, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_DPAD_LEFT + gcPadNumber, R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_GCBIND_DPAD_RIGHT + gcPadNumber, R.string.generic_right, mGameID)); - - - sl.add(new HeaderSetting(mContext, R.string.emulation_control_rumble, 0)); - sl.add(new RumbleBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_EMU_RUMBLE + gcPadNumber, R.string.emulation_control_rumble, - mGameID)); + // TODO } else if (gcPadType == 12) // Adapter { @@ -1147,438 +1086,13 @@ public final class SettingsFragmentPresenter private void addWiimoteSubSettings(ArrayList sl, int wiimoteNumber) { - // Bindings use controller numbers 4-7 (0-3 are GameCube), but the extension setting uses 1-4. - // But game specific extension settings are saved in their own profile. These profiles - // do not have any way to specify the controller that is loaded outside of knowing the filename - // of the profile that was loaded. - AbstractStringSetting extension; - final String defaultExtension = "None"; - if (mGameID.isEmpty()) - { - extension = new LegacyStringSetting(Settings.FILE_WIIMOTE, - Settings.SECTION_WIIMOTE + (wiimoteNumber - 3), SettingsFile.KEY_WIIMOTE_EXTENSION, - defaultExtension); - } - else - { - extension = new WiimoteProfileStringSetting(mGameID, wiimoteNumber - 4, - Settings.SECTION_PROFILE, SettingsFile.KEY_WIIMOTE_EXTENSION, defaultExtension); - } - - sl.add(new StringSingleChoiceSetting(mContext, extension, R.string.wiimote_extensions, 0, - R.array.wiimoteExtensionsEntries, R.array.wiimoteExtensionsValues, - MenuTag.getWiimoteExtensionMenuTag(wiimoteNumber))); - - sl.add(new HeaderSetting(mContext, R.string.generic_buttons, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_A + wiimoteNumber, R.string.button_a, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_B + wiimoteNumber, R.string.button_b, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_1 + wiimoteNumber, R.string.button_one, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_2 + wiimoteNumber, R.string.button_two, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_MINUS + wiimoteNumber, R.string.button_minus, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_PLUS + wiimoteNumber, R.string.button_plus, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_HOME + wiimoteNumber, R.string.button_home, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.wiimote_ir, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_IR_UP + wiimoteNumber, R.string.generic_up, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_IR_DOWN + wiimoteNumber, R.string.generic_down, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_IR_LEFT + wiimoteNumber, R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_IR_RIGHT + wiimoteNumber, R.string.generic_right, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_IR_FORWARD + wiimoteNumber, R.string.generic_forward, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_IR_BACKWARD + wiimoteNumber, R.string.generic_backward, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_IR_HIDE + wiimoteNumber, R.string.ir_hide, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.wiimote_swing, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_SWING_UP + wiimoteNumber, R.string.generic_up, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_SWING_DOWN + wiimoteNumber, R.string.generic_down, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_SWING_LEFT + wiimoteNumber, R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_SWING_RIGHT + wiimoteNumber, R.string.generic_right, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_SWING_FORWARD + wiimoteNumber, R.string.generic_forward, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_SWING_BACKWARD + wiimoteNumber, R.string.generic_backward, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.wiimote_tilt, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TILT_FORWARD + wiimoteNumber, R.string.generic_forward, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TILT_BACKWARD + wiimoteNumber, R.string.generic_backward, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TILT_LEFT + wiimoteNumber, R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TILT_RIGHT + wiimoteNumber, R.string.generic_right, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TILT_MODIFIER + wiimoteNumber, R.string.tilt_modifier, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.wiimote_shake, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_SHAKE_X + wiimoteNumber, R.string.shake_x, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_SHAKE_Y + wiimoteNumber, R.string.shake_y, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_SHAKE_Z + wiimoteNumber, R.string.shake_z, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.controller_dpad, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DPAD_UP + wiimoteNumber, R.string.generic_up, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DPAD_DOWN + wiimoteNumber, R.string.generic_down, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DPAD_LEFT + wiimoteNumber, R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DPAD_RIGHT + wiimoteNumber, R.string.generic_right, mGameID)); - - - sl.add(new HeaderSetting(mContext, R.string.emulation_control_rumble, 0)); - sl.add(new RumbleBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_EMU_RUMBLE + wiimoteNumber, R.string.emulation_control_rumble, - mGameID)); + // TODO } private void addExtensionTypeSettings(ArrayList sl, int wiimoteNumber, int extentionType) { - switch (extentionType) - { - case 1: // Nunchuk - sl.add(new HeaderSetting(mContext, R.string.generic_buttons, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_C + wiimoteNumber, R.string.nunchuk_button_c, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_Z + wiimoteNumber, R.string.button_z, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.generic_stick, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_UP + wiimoteNumber, R.string.generic_up, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_DOWN + wiimoteNumber, R.string.generic_down, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_LEFT + wiimoteNumber, R.string.generic_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_RIGHT + wiimoteNumber, R.string.generic_right, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.wiimote_swing, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_UP + wiimoteNumber, R.string.generic_up, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_DOWN + wiimoteNumber, R.string.generic_down, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_LEFT + wiimoteNumber, R.string.generic_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_RIGHT + wiimoteNumber, - R.string.generic_right, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_FORWARD + wiimoteNumber, - R.string.generic_forward, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_SWING_BACKWARD + wiimoteNumber, - R.string.generic_backward, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.wiimote_tilt, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_FORWARD + wiimoteNumber, - R.string.generic_forward, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_BACKWARD + wiimoteNumber, - R.string.generic_backward, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_LEFT + wiimoteNumber, R.string.generic_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_RIGHT + wiimoteNumber, R.string.generic_right, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_TILT_MODIFIER + wiimoteNumber, - R.string.tilt_modifier, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.wiimote_shake, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_SHAKE_X + wiimoteNumber, R.string.shake_x, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_SHAKE_Y + wiimoteNumber, R.string.shake_y, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_NUNCHUK_SHAKE_Z + wiimoteNumber, R.string.shake_z, - mGameID)); - break; - case 2: // Classic - sl.add(new HeaderSetting(mContext, R.string.generic_buttons, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_A + wiimoteNumber, R.string.button_a, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_B + wiimoteNumber, R.string.button_b, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_X + wiimoteNumber, R.string.button_x, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_Y + wiimoteNumber, R.string.button_y, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_ZL + wiimoteNumber, R.string.classic_button_zl, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_ZR + wiimoteNumber, R.string.classic_button_zr, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_MINUS + wiimoteNumber, R.string.button_minus, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_PLUS + wiimoteNumber, R.string.button_plus, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_HOME + wiimoteNumber, R.string.button_home, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.classic_leftstick, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_UP + wiimoteNumber, R.string.generic_up, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_DOWN + wiimoteNumber, R.string.generic_down, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_LEFT + wiimoteNumber, R.string.generic_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_LEFT_RIGHT + wiimoteNumber, R.string.generic_right, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.classic_rightstick, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_UP + wiimoteNumber, R.string.generic_up, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_DOWN + wiimoteNumber, R.string.generic_down, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_LEFT + wiimoteNumber, R.string.generic_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_RIGHT_RIGHT + wiimoteNumber, - R.string.generic_right, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.controller_trig, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_TRIGGER_L + wiimoteNumber, R.string.trigger_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_TRIGGER_R + wiimoteNumber, R.string.trigger_right, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.controller_dpad, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_UP + wiimoteNumber, R.string.generic_up, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_DOWN + wiimoteNumber, R.string.generic_down, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_LEFT + wiimoteNumber, R.string.generic_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_CLASSIC_DPAD_RIGHT + wiimoteNumber, R.string.generic_right, - mGameID)); - break; - case 3: // Guitar - sl.add(new HeaderSetting(mContext, R.string.guitar_frets, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_FRET_GREEN + wiimoteNumber, R.string.generic_green, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_FRET_RED + wiimoteNumber, R.string.generic_red, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_FRET_YELLOW + wiimoteNumber, - R.string.generic_yellow, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_FRET_BLUE + wiimoteNumber, R.string.generic_blue, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_FRET_ORANGE + wiimoteNumber, - R.string.generic_orange, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.guitar_strum, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_STRUM_UP + wiimoteNumber, R.string.generic_up, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_STRUM_DOWN + wiimoteNumber, R.string.generic_down, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.generic_buttons, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_MINUS + wiimoteNumber, R.string.button_minus, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_PLUS + wiimoteNumber, R.string.button_plus, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.generic_stick, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_STICK_UP + wiimoteNumber, R.string.generic_up, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_STICK_DOWN + wiimoteNumber, R.string.generic_down, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_STICK_LEFT + wiimoteNumber, R.string.generic_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_STICK_RIGHT + wiimoteNumber, R.string.generic_right, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.guitar_whammy, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_GUITAR_WHAMMY_BAR + wiimoteNumber, R.string.generic_right, - mGameID)); - break; - case 4: // Drums - sl.add(new HeaderSetting(mContext, R.string.drums_pads, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_PAD_RED + wiimoteNumber, R.string.generic_red, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_PAD_YELLOW + wiimoteNumber, R.string.generic_yellow, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_PAD_BLUE + wiimoteNumber, R.string.generic_blue, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_PAD_GREEN + wiimoteNumber, R.string.generic_green, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_PAD_ORANGE + wiimoteNumber, R.string.generic_orange, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_PAD_BASS + wiimoteNumber, R.string.drums_pad_bass, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.generic_stick, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_STICK_UP + wiimoteNumber, R.string.generic_up, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_STICK_DOWN + wiimoteNumber, R.string.generic_down, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_STICK_LEFT + wiimoteNumber, R.string.generic_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_STICK_RIGHT + wiimoteNumber, R.string.generic_right, - mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.generic_buttons, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_MINUS + wiimoteNumber, R.string.button_minus, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_DRUMS_PLUS + wiimoteNumber, R.string.button_plus, - mGameID)); - break; - case 5: // Turntable - sl.add(new HeaderSetting(mContext, R.string.generic_buttons, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_GREEN_LEFT + wiimoteNumber, - R.string.turntable_button_green_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_RED_LEFT + wiimoteNumber, - R.string.turntable_button_red_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_BLUE_LEFT + wiimoteNumber, - R.string.turntable_button_blue_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_GREEN_RIGHT + wiimoteNumber, - R.string.turntable_button_green_right, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_RED_RIGHT + wiimoteNumber, - R.string.turntable_button_red_right, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_BLUE_RIGHT + wiimoteNumber, - R.string.turntable_button_blue_right, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_MINUS + wiimoteNumber, - R.string.button_minus, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_PLUS + wiimoteNumber, - R.string.button_plus, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_EUPHORIA + wiimoteNumber, - R.string.turntable_button_euphoria, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.turntable_table_left, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_LEFT_LEFT + wiimoteNumber, R.string.generic_left, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_LEFT_RIGHT + wiimoteNumber, - R.string.generic_right, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.turntable_table_right, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_RIGHT_LEFT + wiimoteNumber, - R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_RIGHT_RIGHT + wiimoteNumber, - R.string.generic_right, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.generic_stick, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_UP + wiimoteNumber, R.string.generic_up, - mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_DOWN + wiimoteNumber, - R.string.generic_down, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_LEFT + wiimoteNumber, - R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_STICK_RIGHT + wiimoteNumber, - R.string.generic_right, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.turntable_effect, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_EFFECT_DIAL + wiimoteNumber, - R.string.turntable_effect_dial, mGameID)); - - sl.add(new HeaderSetting(mContext, R.string.turntable_crossfade, 0)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_CROSSFADE_LEFT + wiimoteNumber, - R.string.generic_left, mGameID)); - sl.add(new InputBindingSetting(mContext, Settings.FILE_DOLPHIN, Settings.SECTION_BINDINGS, - SettingsFile.KEY_WIIBIND_TURNTABLE_CROSSFADE_RIGHT + wiimoteNumber, - R.string.generic_right, mGameID)); - break; - } + // TODO } private static int getLogVerbosityEntries() diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java index 87f58b4d02..9362b4e980 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java @@ -22,158 +22,9 @@ public final class SettingsFile public static final String KEY_GCPAD_PLAYER_1 = "SIDevice0"; - 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_EMU_RUMBLE = "EmuRumble"; - - public static final String KEY_WIIMOTE_EXTENSION = "Extension"; - - // Controller keys for game specific settings - public static final String KEY_WIIMOTE_PROFILE = "WiimoteProfile"; - - 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_IR_PITCH = "IRTotalPitch"; public static final String KEY_WIIBIND_IR_YAW = "IRTotalYaw"; public static final String KEY_WIIBIND_IR_VERTICAL_OFFSET = "IRVerticalOffset"; - 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_"; private static BiMap sectionsMap = new BiMap<>(); @@ -283,13 +134,4 @@ public final class SettingsFile return new File( DirectoryInitialization.getUserDirectory() + "/GameSettings/" + gameId + ".ini"); } - - public static File getWiiProfile(String profile) - { - String wiiConfigPath = - DirectoryInitialization.getUserDirectory() + "/Config/Profiles/Wiimote/" + - profile + ".ini"; - - return new File(wiiConfigPath); - } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/ControllerMappingHelper.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/ControllerMappingHelper.java deleted file mode 100644 index 9e31a46a96..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/ControllerMappingHelper.java +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later - -package org.dolphinemu.dolphinemu.utils; - -import android.view.InputDevice; -import android.view.KeyEvent; -import android.view.MotionEvent; - -/** - * Some controllers have incorrect mappings. This class has special-case fixes for them. - */ -public class ControllerMappingHelper -{ - /** - * Some controllers report extra button presses that can be ignored. - */ - public static boolean shouldKeyBeIgnored(InputDevice inputDevice, int keyCode) - { - if (isDualShock4(inputDevice)) - { - // The two analog triggers generate analog motion events as well as a keycode. - // We always prefer to use the analog values, so throw away the button press - return keyCode == KeyEvent.KEYCODE_BUTTON_L2 || keyCode == KeyEvent.KEYCODE_BUTTON_R2; - } - return false; - } - - /** - * Scale an axis to be zero-centered with a proper range. - */ - public static float scaleAxis(InputDevice inputDevice, int axis, float value) - { - if (isDualShock4(inputDevice)) - { - // Android doesn't have correct mappings for this controller's triggers. It reports them - // as RX & RY, centered at -1.0, and with a range of [-1.0, 1.0] - // Scale them to properly zero-centered with a range of [0.0, 1.0]. - if (axis == MotionEvent.AXIS_RX || axis == MotionEvent.AXIS_RY) - { - return (value + 1) / 2.0f; - } - } - else if (isXboxOneWireless(inputDevice)) - { - // Same as the DualShock 4, the mappings are missing. - if (axis == MotionEvent.AXIS_Z || axis == MotionEvent.AXIS_RZ) - { - return (value + 1) / 2.0f; - } - } - return value; - } - - private static boolean isDualShock4(InputDevice inputDevice) - { - // Sony DualShock 4 controller - return inputDevice.getVendorId() == 0x54c && inputDevice.getProductId() == 0x9cc; - } - - private static boolean isXboxOneWireless(InputDevice inputDevice) - { - // Microsoft Xbox One controller - return inputDevice.getVendorId() == 0x45e && inputDevice.getProductId() == 0x2e0; - } -} diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index e81092cbb9..cca14f13a8 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -11,14 +11,6 @@ GameCube Controller 3 GameCube Controller 4 - Control Stick - C Stick - Triggers - D-Pad - Modifier Range - Analog Radius (High value = High sensitivity) - Analog Threshold (Low value = High sensitivity) - Wii Remote 1 Wii Remote 2 Wii Remote 3 @@ -30,85 +22,9 @@ Wii Remote Extension 4 Extension - Choose and bind the Wii Remote extension. - IR - Swing - Tilt - Shake Input Binding Press or move an input to bind it to %1$s. - Press or move any input to set rumble. - - - Buttons - Up - Down - Left - Right - Forward - Backward - Stick - Green - Red - Yellow - Blue - Orange - - - A - B - START - X - Y - Z - L - R - - - 1 - 2 - - - + - HOME - Hide - Modifier - X - Y - Z - - - C - - - ZL - ZR - Left Stick - Right Stick - - - Frets - Strum - Whammy - Bar - - - Pads - Bass - - - Green Left - Red Left - Blue Left - Green Right - Red Right - Blue Right - Euphoria - Table Left - Table Right - Effect - Dial - Crossfade Settings @@ -528,7 +444,6 @@ Save and Exit Game Properties Game Properties: %1$s - Extension Bindings Junk Data Found The settings file for this game contains extraneous data added by an old version of Dolphin. This will likely prevent global settings from working as intended.\n\nWould you like to fix this by deleting the settings file for this game? All game-specific settings and cheats that you have added will be removed. This cannot be undone. @@ -626,7 +541,6 @@ It can efficiently compress both junk data and encrypted Wii data. Opacity Adjust Controls Relative Stick Center - Rumble Choose Controller Press Back to access the menu.\nLong press Back to exit emulation. Reset Overlay @@ -643,13 +557,6 @@ It can efficiently compress both junk data and encrypted Wii data. Bongo Controller Enable this if you are using bongos on this port. - - General - Controllers - - - Device rumble not found - Due to the Scoped Storage policy in Android 11 and newer, you can\'t change this path. Loading Settingsā€¦ This setting can\'t be changed while a game is running.