From e7eeb1087352a00ded7292bf2f2d51bcfaaefb23 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 23 Sep 2022 21:51:13 +0200 Subject: [PATCH] Config: Add support for X,Y, L3, R3, PLUS and MINUS in "onButtonPressed" callback --- Dockerfile | 4 ++-- source/utils/ConfigUtils.cpp | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 809b67e..82d566a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/source/utils/ConfigUtils.cpp b/source/utils/ConfigUtils.cpp index f17db0c..a4c80ae 100644 --- a/source/utils/ConfigUtils.cpp +++ b/source/utils/ConfigUtils.cpp @@ -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; }