Add macro action to stop other macros

This commit is contained in:
WarmUpTill
2022-01-14 18:49:43 +01:00
committed by WarmUpTill
parent 7349841758
commit 38b7e08711
5 changed files with 15 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ enum class PerformMacroAction {
UNPAUSE,
RESET_COUNTER,
RUN,
STOP,
};
class MacroActionMacro : public MacroRefAction {

View File

@@ -88,6 +88,7 @@ public:
bool MatchOnChange() { return _matchOnChange; }
int GetCount() { return _count; };
void ResetCount() { _count = 0; };
void Stop() { _stop = true; }
std::deque<std::shared_ptr<MacroCondition>> &Conditions()
{
return _conditions;
@@ -126,6 +127,7 @@ private:
obs_hotkey_id _unpauseHotkey = OBS_INVALID_HOTKEY_ID;
obs_hotkey_id _togglePauseHotkey = OBS_INVALID_HOTKEY_ID;
bool _die = false;
bool _stop = false;
bool _done = true;
std::thread _thread;