Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11868 from JosJuice/android-wiimote-submenu-number
Android: Fix submenus for Wii Remote 2-4
  • Loading branch information
t895 committed Jun 2, 2023
2 parents 09dc764 + 3a81463 commit 6028c05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -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

Expand Down
Expand Up @@ -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)
Expand Down

0 comments on commit 6028c05

Please sign in to comment.