From 08489a687daa566edab33fa08d5f74e759258020 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 4 Jan 2025 13:12:20 +0100 Subject: [PATCH] ButtonComboAPI: Add support for more wiimote buttons --- Dockerfile | 4 ++-- source/plugin/ButtonComboManager.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f0ddbf5..ecd6dcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM ghcr.io/wiiu-env/devkitppc:20241128 COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20240424 /artifacts $DEVKITPRO -COPY --from=ghcr.io/wiiu-env/wiiupluginsystem:0.8.2-dev-20241231-67b8431 /artifacts $DEVKITPRO +COPY --from=ghcr.io/wiiu-env/wiiupluginsystem:0.8.2-dev-20250104-1569d27 /artifacts $DEVKITPRO COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20230621 /artifacts $DEVKITPRO COPY --from=ghcr.io/wiiu-env/libmappedmemory:20230621 /artifacts $DEVKITPRO COPY --from=ghcr.io/wiiu-env/libwupsbackend:20240425 /artifacts $DEVKITPRO COPY --from=ghcr.io/wiiu-env/libnotifications:20240426 /artifacts $DEVKITPRO -COPY --from=ghcr.io/wiiu-env/libbuttoncombo:20241231-a2f949b /artifacts $DEVKITPRO +COPY --from=ghcr.io/wiiu-env/libbuttoncombo:20250104-0663ede /artifacts $DEVKITPRO WORKDIR project diff --git a/source/plugin/ButtonComboManager.cpp b/source/plugin/ButtonComboManager.cpp index 86053e9..3d1c64c 100644 --- a/source/plugin/ButtonComboManager.cpp +++ b/source/plugin/ButtonComboManager.cpp @@ -156,6 +156,18 @@ namespace { if (other & WUPS_BUTTON_COMBO_BUTTON_RESERVED_BIT) { res |= BCMPAD_BUTTON_RESERVED_BIT; } + if (other & WUPS_BUTTON_COMBO_BUTTON_1) { + res |= BCMPAD_BUTTON_1; + } + if (other & WUPS_BUTTON_COMBO_BUTTON_2) { + res |= BCMPAD_BUTTON_2; + } + if (other & WUPS_BUTTON_COMBO_BUTTON_C) { + res |= BCMPAD_BUTTON_C; + } + if (other & WUPS_BUTTON_COMBO_BUTTON_Z) { + res |= BCMPAD_BUTTON_Z; + } return static_cast(res); } @@ -215,6 +227,18 @@ namespace { if (other & BCMPAD_BUTTON_RESERVED_BIT) { res |= WUPS_BUTTON_COMBO_BUTTON_RESERVED_BIT; } + if (other & BCMPAD_BUTTON_1) { + res |= WUPS_BUTTON_COMBO_BUTTON_1; + } + if (other & BCMPAD_BUTTON_2) { + res |= WUPS_BUTTON_COMBO_BUTTON_2; + } + if (other & BCMPAD_BUTTON_C) { + res |= WUPS_BUTTON_COMBO_BUTTON_C; + } + if (other & BCMPAD_BUTTON_Z) { + res |= WUPS_BUTTON_COMBO_BUTTON_Z; + } return static_cast(res); }