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.
This commit is contained in:
WarmUpTill
2022-01-20 21:04:17 +01:00
committed by WarmUpTill
parent 5d58269b02
commit 7349841758

View File

@@ -14,7 +14,13 @@ static void hotkeyCB(void *data, obs_hotkey_id, obs_hotkey_t *, bool pressed)
{
if (pressed) {
auto c = static_cast<MacroConditionHotkey *>(data);
c->SetPressed();
auto macro = c->GetMacro();
if (!macro) {
c->SetPressed();
}
if (macro && !macro->Paused()) {
c->SetPressed();
}
}
}