From c285d987ae8a25f5e34cd8fc9f74b580237d2a1c Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 12 Jan 2025 11:16:38 +0100 Subject: [PATCH 1/3] Fix return value of setMetaOptions --- source/ButtonComboInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ButtonComboInfo.cpp b/source/ButtonComboInfo.cpp index 52a83f1..305582c 100644 --- a/source/ButtonComboInfo.cpp +++ b/source/ButtonComboInfo.cpp @@ -32,12 +32,12 @@ const std::string &ButtonComboInfoIF::getLabel() const { bool ButtonComboInfoIF::getMetaOptions(const ButtonComboModule_MetaOptionsOut &outMeta) const { if (outMeta.labelBuffer == nullptr || outMeta.labelBufferLength == 0) { - return true; + return false; } snprintf(outMeta.labelBuffer, outMeta.labelBufferLength, mLabel.c_str()); - return false; + return true; } void ButtonComboInfoIF::setMetaOptions(const ButtonComboModule_MetaOptions options) { From 067aba41692750626024aae28f003bf3a6b05a26 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 12 Jan 2025 11:17:20 +0100 Subject: [PATCH 2/3] Properly re-enable button combo detection when exiting the combo detection --- source/ButtonComboManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ButtonComboManager.cpp b/source/ButtonComboManager.cpp index f25c23c..5ede433 100644 --- a/source/ButtonComboManager.cpp +++ b/source/ButtonComboManager.cpp @@ -737,7 +737,7 @@ ButtonComboModule_Error ButtonComboManager::DetectButtonCombo_Blocking(const But if (doShutdownKPAD) { KPADShutdown(); } - mInButtonComboDetection = true; + mInButtonComboDetection = false; return result; } From 45120c2dbfb948693fc680e2eeec2e4b52be8900 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 12 Jan 2025 11:17:40 +0100 Subject: [PATCH 3/3] Fixed some logging strings --- source/ButtonComboInfoHold.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ButtonComboInfoHold.cpp b/source/ButtonComboInfoHold.cpp index 696cfb2..4c0c73b 100644 --- a/source/ButtonComboInfoHold.cpp +++ b/source/ButtonComboInfoHold.cpp @@ -15,11 +15,11 @@ ButtonComboInfoHold::ButtonComboInfoHold(std::string label, context, observer), mTargetDurationInMs(targetDurationInMs) { - DEBUG_FUNCTION_LINE_INFO("Created ButtonComboInfoDown: \"%s\", combo: %08X, targetDurationInMs: %d ms, controllerMask: %08X", mLabel.c_str(), mCombo, mTargetDurationInMs, mControllerMask); + DEBUG_FUNCTION_LINE_INFO("Created ButtonComboInfoHold: \"%s\", combo: %08X, targetDurationInMs: %d ms, controllerMask: %08X", mLabel.c_str(), mCombo, mTargetDurationInMs, mControllerMask); } ButtonComboInfoHold::~ButtonComboInfoHold() { - DEBUG_FUNCTION_LINE_INFO("Deleted ButtonComboInfoDown: \"%s\", combo: %08X, targetDurationInMs: %d ms, controllerMask: %08X", mLabel.c_str(), mCombo, mTargetDurationInMs, mControllerMask); + DEBUG_FUNCTION_LINE_INFO("Deleted ButtonComboInfoHold: \"%s\", combo: %08X, targetDurationInMs: %d ms, controllerMask: %08X", mLabel.c_str(), mCombo, mTargetDurationInMs, mControllerMask); } void ButtonComboInfoHold::UpdateInput(const ButtonComboModule_ControllerTypes controller, const std::span pressedButtons) {