Merge pull request #11868 from JosJuice/android-wiimote-submenu-number

Android: Fix submenus for Wii Remote 2-4
This commit is contained in:
Charles Lombardo 2023-06-02 15:47:07 -04:00 committed by GitHub
commit 6028c05644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -85,6 +85,14 @@ enum class MenuTag {
val isWiimoteMenu: Boolean
get() = this == WIIMOTE_1 || this == WIIMOTE_2 || this == WIIMOTE_3 || this == WIIMOTE_4
val isWiimoteSubmenu: Boolean
get() = this == WIIMOTE_GENERAL_1 || this == WIIMOTE_GENERAL_2 ||
this == WIIMOTE_GENERAL_3 || this == WIIMOTE_GENERAL_4 ||
this == WIIMOTE_MOTION_SIMULATION_1 || this == WIIMOTE_MOTION_SIMULATION_2 ||
this == WIIMOTE_MOTION_SIMULATION_3 || this == WIIMOTE_MOTION_SIMULATION_4 ||
this == WIIMOTE_MOTION_INPUT_1 || this == WIIMOTE_MOTION_INPUT_2 ||
this == WIIMOTE_MOTION_INPUT_3 || this == WIIMOTE_MOTION_INPUT_4
val isWiimoteExtensionMenu: Boolean
get() = this == WIIMOTE_EXTENSION_1 || this == WIIMOTE_EXTENSION_2 || this == WIIMOTE_EXTENSION_3 || this == WIIMOTE_EXTENSION_4

View File

@ -52,7 +52,7 @@ class SettingsFragmentPresenter(
if (menuTag.isGCPadMenu || menuTag.isWiimoteExtensionMenu) {
controllerNumber = menuTag.subType
controllerType = extras.getInt(ARG_CONTROLLER_TYPE)
} else if (menuTag.isWiimoteMenu) {
} else if (menuTag.isWiimoteMenu || menuTag.isWiimoteSubmenu) {
controllerNumber = menuTag.subType
} else if (menuTag.isSerialPort1Menu) {
serialPort1Type = extras.getInt(ARG_SERIALPORT1_TYPE)