mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-20 00:05:41 -05:00
Rename "count" to "runCount"
This commit is contained in:
@@ -429,7 +429,7 @@ void SwitcherData::Start()
|
||||
void ResetMacros()
|
||||
{
|
||||
for (auto &m : switcher->macros) {
|
||||
m->ResetCount();
|
||||
m->ResetRunCount();
|
||||
m->ResetTimers();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ bool MacroActionMacro::PerformAction()
|
||||
_macro->SetPaused(false);
|
||||
break;
|
||||
case PerformMacroAction::RESET_COUNTER:
|
||||
_macro->ResetCount();
|
||||
_macro->ResetRunCount();
|
||||
break;
|
||||
case PerformMacroAction::RUN:
|
||||
if (!_macro->Paused()) {
|
||||
|
||||
@@ -88,11 +88,11 @@ bool MacroConditionMacro::CheckCountCondition()
|
||||
|
||||
switch (_counterCondition) {
|
||||
case CounterCondition::BELOW:
|
||||
return _macro->GetCount() < _count;
|
||||
return _macro->RunCount() < _count;
|
||||
case CounterCondition::ABOVE:
|
||||
return _macro->GetCount() > _count;
|
||||
return _macro->RunCount() > _count;
|
||||
case CounterCondition::EQUAL:
|
||||
return _macro->GetCount() == _count;
|
||||
return _macro->RunCount() == _count;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -477,14 +477,14 @@ void MacroConditionMacroEdit::ResetClicked()
|
||||
return;
|
||||
}
|
||||
|
||||
_entryData->_macro->ResetCount();
|
||||
_entryData->_macro->ResetRunCount();
|
||||
}
|
||||
|
||||
void MacroConditionMacroEdit::UpdateCount()
|
||||
{
|
||||
if (_entryData && _entryData->_macro.get()) {
|
||||
_currentCount->setText(
|
||||
QString::number(_entryData->_macro->GetCount()));
|
||||
QString::number(_entryData->_macro->RunCount()));
|
||||
} else {
|
||||
_currentCount->setText("-");
|
||||
}
|
||||
|
||||
@@ -114,8 +114,8 @@ bool Macro::CeckMatch()
|
||||
// TODO: Move back to PerformAction() once new scene collection frontend
|
||||
// events are available - see:
|
||||
// https://github.com/obsproject/obs-studio/commit/feda1aaa283e8a99f6ba1159cfe6b9c1f2934a61
|
||||
if (_matched && _count != std::numeric_limits<int>::max()) {
|
||||
_count++;
|
||||
if (_matched && _runCount != std::numeric_limits<int>::max()) {
|
||||
_runCount++;
|
||||
}
|
||||
_lastCheckTime = std::chrono::high_resolution_clock::now();
|
||||
return _matched;
|
||||
|
||||
@@ -32,8 +32,8 @@ public:
|
||||
bool Paused() { return _paused; }
|
||||
void SetMatchOnChange(bool onChange) { _matchOnChange = onChange; }
|
||||
bool MatchOnChange() { return _matchOnChange; }
|
||||
int GetCount() { return _count; };
|
||||
void ResetCount() { _count = 0; };
|
||||
int RunCount() { return _runCount; };
|
||||
void ResetRunCount() { _runCount = 0; };
|
||||
void AddHelperThread(std::thread &&);
|
||||
bool GetStop() { return _stop; }
|
||||
void Stop();
|
||||
@@ -80,7 +80,7 @@ private:
|
||||
bool _lastMatched = false;
|
||||
bool _matchOnChange = false;
|
||||
bool _paused = false;
|
||||
int _count = 0;
|
||||
int _runCount = 0;
|
||||
bool _registerHotkeys = true;
|
||||
obs_hotkey_id _pauseHotkey = OBS_INVALID_HOTKEY_ID;
|
||||
obs_hotkey_id _unpauseHotkey = OBS_INVALID_HOTKEY_ID;
|
||||
|
||||
Reference in New Issue
Block a user