Block when calling Stop() until macro is stopped

This commit is contained in:
WarmUpTill
2022-03-01 19:59:48 +01:00
committed by WarmUpTill
parent ac5b2c3f9e
commit 8131ad3c24

View File

@@ -180,6 +180,15 @@ void Macro::SetPaused(bool pause)
_paused = pause;
}
void Macro::Stop()
{
_stop = true;
switcher->macroWaitCv.notify_all();
if (_thread.joinable()) {
_thread.join();
}
}
void Macro::UpdateActionIndices()
{
int idx = 0;