Move interval reset handling

This commit is contained in:
WarmUpTill
2025-03-18 19:40:11 +01:00
committed by WarmUpTill
parent eaad4d1bbd
commit 9944a1b03b
6 changed files with 22 additions and 30 deletions

View File

@@ -168,17 +168,6 @@ void SwitcherData::SaveVersion(obs_data_t *obj,
obs_data_set_string(obj, "version", currentVersion.c_str());
}
void SwitcherData::AddIntervalResetStep(std::function<void()> function,
bool tryLock)
{
if (!tryLock) {
resetIntervalSteps.emplace_back(function);
return;
}
std::lock_guard<std::mutex> lock(switcher->m);
resetIntervalSteps.emplace_back(function);
}
void SwitcherData::RunPostLoadSteps()
{
for (const auto &func : postLoadSteps) {