Config: Add support for X,Y, L3, R3, PLUS and MINUS in "onButtonPressed" callback

This commit is contained in:
Maschell 2022-09-23 21:51:13 +02:00
parent e5b63ebf9f
commit e7eeb10873
2 changed files with 21 additions and 2 deletions

View File

@ -1,7 +1,7 @@
FROM wiiuenv/devkitppc:20220806
FROM wiiuenv/devkitppc:20220917
COPY --from=wiiuenv/wiiumodulesystem:20220904 /artifacts $DEVKITPRO
COPY --from=wiiuenv/wiiupluginsystem:20220904 /artifacts $DEVKITPRO
COPY --from=wiiuenv/wiiupluginsystem:20220923 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libfunctionpatcher:20220904 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libmappedmemory:20220904 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libwupsbackend:20220904 /artifacts $DEVKITPRO

View File

@ -445,6 +445,25 @@ void ConfigUtils::displayMenu() {
if (buttonsTriggered & VPAD_BUTTON_ZR) {
pressedButtons |= WUPS_CONFIG_BUTTON_ZR;
}
if (buttonsTriggered & VPAD_BUTTON_X) {
pressedButtons |= WUPS_CONFIG_BUTTON_Y;
}
if (buttonsTriggered & VPAD_BUTTON_Y) {
pressedButtons |= WUPS_CONFIG_BUTTON_X;
}
if (buttonsTriggered & VPAD_BUTTON_STICK_L) {
pressedButtons |= WUPS_CONFIG_BUTTON_STICK_L;
}
if (buttonsTriggered & VPAD_BUTTON_STICK_R) {
pressedButtons |= WUPS_CONFIG_BUTTON_STICK_R;
}
if (buttonsTriggered & VPAD_BUTTON_PLUS) {
pressedButtons |= WUPS_CONFIG_BUTTON_PLUS;
}
if (buttonsTriggered & VPAD_BUTTON_MINUS) {
pressedButtons |= WUPS_CONFIG_BUTTON_MINUS;
}
if (pressedButtons != WUPS_CONFIG_BUTTON_NONE) {
redraw = true;
}