mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Add option to ignore pause during condition check
This commit is contained in:
parent
7e1d20031c
commit
99c8a46296
|
|
@ -101,7 +101,7 @@ void Macro::PrepareMoveToGroup(std::shared_ptr<Macro> group,
|
|||
}
|
||||
}
|
||||
|
||||
bool Macro::CeckMatch()
|
||||
bool Macro::CeckMatch(bool ignorePause)
|
||||
{
|
||||
if (_isGroup) {
|
||||
return false;
|
||||
|
|
@ -109,7 +109,7 @@ bool Macro::CeckMatch()
|
|||
|
||||
_matched = false;
|
||||
for (auto &c : _conditions) {
|
||||
if (_paused) {
|
||||
if (_paused && !ignorePause) {
|
||||
vblog(LOG_INFO, "Macro %s is paused", _name.c_str());
|
||||
return false;
|
||||
}
|
||||
|
|
@ -185,6 +185,7 @@ bool Macro::CeckMatch()
|
|||
if (!_conditionSateChanged && _performActionsOnChange) {
|
||||
_onPreventedActionExecution = true;
|
||||
}
|
||||
|
||||
_lastMatched = _matched;
|
||||
_lastCheckTime = std::chrono::high_resolution_clock::now();
|
||||
return _matched;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public:
|
|||
std::string Name() const { return _name; }
|
||||
void SetName(const std::string &name);
|
||||
|
||||
bool CeckMatch();
|
||||
bool CeckMatch(bool ignorePause = false);
|
||||
bool Matched() const { return _matched; }
|
||||
int64_t MsSinceLastCheck() const;
|
||||
bool ShouldRunActions() const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user