From 7349841758429f07876605b3d8db7df67ffcec0a Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Thu, 20 Jan 2022 21:04:17 +0100 Subject: [PATCH] Fix unexpectedly returning true for hotkey condition The condition would return true after unpause, if a configured hotkey was pressed during the time the macro was paused. --- src/macro-condition-hotkey.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/macro-condition-hotkey.cpp b/src/macro-condition-hotkey.cpp index 287078fc..255a8a2a 100644 --- a/src/macro-condition-hotkey.cpp +++ b/src/macro-condition-hotkey.cpp @@ -14,7 +14,13 @@ static void hotkeyCB(void *data, obs_hotkey_id, obs_hotkey_t *, bool pressed) { if (pressed) { auto c = static_cast(data); - c->SetPressed(); + auto macro = c->GetMacro(); + if (!macro) { + c->SetPressed(); + } + if (macro && !macro->Paused()) { + c->SetPressed(); + } } }