From 96ea43ea5707875a422746bc2beb4313af5de675 Mon Sep 17 00:00:00 2001 From: Maschell Date: Mon, 12 Jan 2026 16:42:44 +0100 Subject: [PATCH 1/2] Update Dockerfile --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 15e7022..2ad74eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM ghcr.io/wiiu-env/devkitppc:20250608 +FROM ghcr.io/wiiu-env/devkitppc:20260225 -COPY --from=ghcr.io/wiiu-env/libbuttoncombo:20250125-cb22627 /artifacts $DEVKITPRO -COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20241012 /artifacts $DEVKITPRO -COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20240424 /artifacts $DEVKITPRO +COPY --from=ghcr.io/wiiu-env/libbuttoncombo:20260112-e8efe9d /artifacts $DEVKITPRO +COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20260208 /artifacts $DEVKITPRO +COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20260225 /artifacts $DEVKITPRO WORKDIR /project From 668bd58b7cfc01fae2b263a10e8f01d40983a337 Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 20 Jan 2026 18:16:34 +0100 Subject: [PATCH 2/2] Fix compiling with debug flag --- .gitignore | 1 + Makefile | 2 +- source/ButtonComboInfo.cpp | 10 +++++----- source/ButtonComboInfoDown.cpp | 4 ++-- source/ButtonComboInfoHold.cpp | 6 +++--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 98a796f..1217d41 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ cmake-build-debug/ CMakeLists.txt *.wms *.zip +docs/ diff --git a/Makefile b/Makefile index 2168b7d..bdfc792 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ INCLUDES := source #------------------------------------------------------------------------------- # options for code generation #------------------------------------------------------------------------------- -CFLAGS := -Wall -Wextra -O2 -ffunction-sections\ +CFLAGS := -Wall -Wextra -Werror -Os -ffunction-sections\ $(MACHDEP) CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__ diff --git a/source/ButtonComboInfo.cpp b/source/ButtonComboInfo.cpp index 305582c..809aecd 100644 --- a/source/ButtonComboInfo.cpp +++ b/source/ButtonComboInfo.cpp @@ -42,7 +42,7 @@ bool ButtonComboInfoIF::getMetaOptions(const ButtonComboModule_MetaOptionsOut &o void ButtonComboInfoIF::setMetaOptions(const ButtonComboModule_MetaOptions options) { mLabel = options.label; - DEBUG_FUNCTION_LINE("Updated label to: \"%s\", for %08X", mLabel.c_str(), getHandle().handle); + DEBUG_FUNCTION_LINE("Updated label to: \"%s\", for %p", mLabel.c_str(), getHandle().handle); } ButtonComboModule_CallbackOptions ButtonComboInfoIF::getCallbackOptions() const { @@ -52,7 +52,7 @@ ButtonComboModule_CallbackOptions ButtonComboInfoIF::getCallbackOptions() const void ButtonComboInfoIF::setCallbackOptions(const ButtonComboModule_CallbackOptions options) { mCallback = options.callback; mContext = options.context; - DEBUG_FUNCTION_LINE("Updated callback to: %08X(%08X), for %s %08X", mCallback, mContext, mLabel.c_str(), getHandle().handle); + DEBUG_FUNCTION_LINE("Updated callback to: %p(%p), for %s handle: %p", mCallback, mContext, mLabel.c_str(), getHandle().handle); } uint32_t ButtonComboInfoIF::getCombo() const { @@ -60,7 +60,7 @@ uint32_t ButtonComboInfoIF::getCombo() const { } void ButtonComboInfoIF::setCombo(const ButtonComboModule_Buttons combo) { mCombo = combo; - DEBUG_FUNCTION_LINE("Updated combo to: %08X, for %s %08X", mCombo, mLabel.c_str(), getHandle().handle); + DEBUG_FUNCTION_LINE("Updated combo to: %08X, for %s handle: %p", mCombo, mLabel.c_str(), getHandle().handle); resetPrevInput(); } @@ -70,7 +70,7 @@ ButtonComboModule_ComboStatus ButtonComboInfoIF::getStatus() const { void ButtonComboInfoIF::setStatus(const ButtonComboModule_ComboStatus status) { mStatus = status; - DEBUG_FUNCTION_LINE("Updated status to: %08X, for %s %08X", mStatus, mLabel.c_str(), getHandle().handle); + DEBUG_FUNCTION_LINE("Updated status to: %08X, for %s handle: %p", mStatus, mLabel.c_str(), getHandle().handle); } ButtonComboModule_ControllerTypes ButtonComboInfoIF::getControllerMask() const { @@ -79,7 +79,7 @@ ButtonComboModule_ControllerTypes ButtonComboInfoIF::getControllerMask() const { void ButtonComboInfoIF::setControllerMask(const ButtonComboModule_ControllerTypes mask) { mControllerMask = mask; - DEBUG_FUNCTION_LINE("Updated controllerMask to: %08X, for %s %08X", mControllerMask, mLabel.c_str(), getHandle().handle); + DEBUG_FUNCTION_LINE("Updated controllerMask to: %08X, for %s handle: %p", mControllerMask, mLabel.c_str(), getHandle().handle); resetPrevInput(); } diff --git a/source/ButtonComboInfoDown.cpp b/source/ButtonComboInfoDown.cpp index 024fc64..068bb1d 100644 --- a/source/ButtonComboInfoDown.cpp +++ b/source/ButtonComboInfoDown.cpp @@ -30,7 +30,7 @@ void ButtonComboInfoDown::UpdateInput( auto &[prevButtonCombo] = mHoldInformation[chanIndex]; - DEBUG_FUNCTION_LINE_VERBOSE("[PRESS DOWN] Check button combo %08X on controller %08X (lastItem im pressedButtons (size %d) is %08X) for %s [%08X]", mCombo, controller, pressedButtons.size(), pressedButtons.back(), mLabel.c_str(), getHandle().handle); + DEBUG_FUNCTION_LINE_VERBOSE("[PRESS DOWN] Check button combo %08X on controller %08X (lastItem im pressedButtons (size %d) is %08X) for %s [%p]", mCombo, controller, pressedButtons.size(), pressedButtons.back(), mLabel.c_str(), getHandle().handle); for (const auto &pressedButton : pressedButtons) { const bool prevButtonsIncludedCombo = (prevButtonCombo & mCombo) == mCombo; // Make sure the combo can't be triggered on releasing @@ -39,7 +39,7 @@ void ButtonComboInfoDown::UpdateInput( if (buttonsPressedChanged && buttonsPressedMatchCombo && !prevButtonsIncludedCombo) { if (mCallback != nullptr) { - DEBUG_FUNCTION_LINE("Calling callback [%08X](controller: %08X, context: %08X) for \"%s\" [handle: %08X], pressed down %08X", mCallback, controller, mContext, mLabel.c_str(), getHandle().handle, mCombo); + DEBUG_FUNCTION_LINE("Calling callback [%p](controller: %08X, context: %p) for \"%s\" [handle: %p], pressed down %08X", mCallback, controller, mContext, mLabel.c_str(), getHandle().handle, mCombo); mCallback(controller, getHandle(), mContext); } else { DEBUG_FUNCTION_LINE_WARN("Callback was null for combo %p", getHandle().handle); diff --git a/source/ButtonComboInfoHold.cpp b/source/ButtonComboInfoHold.cpp index 9c9d088..d656a47 100644 --- a/source/ButtonComboInfoHold.cpp +++ b/source/ButtonComboInfoHold.cpp @@ -35,7 +35,7 @@ void ButtonComboInfoHold::UpdateInput(const ButtonComboModule_ControllerTypes co auto &holdInformation = mHoldInformation[chanIndex]; const auto latestButtonPress = pressedButtons.back(); - DEBUG_FUNCTION_LINE_VERBOSE("[HOLD ] Check button combo %08X on controller %08X (lastItem im pressedButtons (size %d) is %08X) for %s [%08X]", mCombo, controller, pressedButtons.size(), latestButtonPress, mLabel.c_str(), getHandle().handle); + DEBUG_FUNCTION_LINE_VERBOSE("[HOLD ] Check button combo %08X on controller %08X (lastItem im pressedButtons (size %d) is %08X) for %s [%p]", mCombo, controller, pressedButtons.size(), latestButtonPress, mLabel.c_str(), getHandle().handle); const bool prevButtonsIncludedCombo = (holdInformation.prevButtonCombo & mCombo) == mCombo; // Make sure the combo can't be triggered on releasing const bool buttonsPressedChanged = holdInformation.prevButtonCombo != latestButtonPress; // Avoid "holding" the combo @@ -51,7 +51,7 @@ void ButtonComboInfoHold::UpdateInput(const ButtonComboModule_ControllerTypes co if (intervalInMs > mTargetDurationInMs && !holdInformation.callbackTriggered) { if (mCallback != nullptr) { - DEBUG_FUNCTION_LINE("Calling callback [%08X](controller: %08X context: %08X) for \"%s\" [handle: %08X], hold %08X for %d ms", mCallback, controller, mContext, mLabel.c_str(), getHandle().handle, mCombo, intervalInMs); + DEBUG_FUNCTION_LINE("Calling callback [%p](controller: %08X context: %p) for \"%s\" [handle: %p], hold %08X for %d ms", mCallback, controller, mContext, mLabel.c_str(), getHandle().handle, mCombo, intervalInMs); mCallback(controller, getHandle(), mContext); } else { @@ -66,7 +66,7 @@ void ButtonComboInfoHold::UpdateInput(const ButtonComboModule_ControllerTypes co } ButtonComboModule_Error ButtonComboInfoHold::setHoldDuration(const uint32_t holdDurationInMs) { - DEBUG_FUNCTION_LINE("Setting holdDurationInMs to %d for %s [%08X]", holdDurationInMs, mLabel.c_str(), getHandle().handle); + DEBUG_FUNCTION_LINE("Setting holdDurationInMs to %d for %s [%p]", holdDurationInMs, mLabel.c_str(), getHandle().handle); mTargetDurationInMs = holdDurationInMs; return BUTTON_COMBO_MODULE_ERROR_SUCCESS; }