mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-11 19:58:49 -05:00
Don't block UI while running actions
This commit is contained in:
@@ -428,10 +428,11 @@ bool Macro::RunActionsHelper(
|
||||
}
|
||||
if (action->Enabled()) {
|
||||
action->LogAction();
|
||||
bool actionResult = false;
|
||||
action->WithLock([&action, &actionResult]() {
|
||||
actionResult = action->PerformAction();
|
||||
std::shared_ptr<MacroAction> actionCopy;
|
||||
action->WithLock([&action, &actionCopy]() {
|
||||
actionCopy = action->Copy();
|
||||
});
|
||||
bool actionResult = actionCopy->PerformAction();
|
||||
actionsExecutedSuccessfully =
|
||||
actionsExecutedSuccessfully && actionResult;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user