mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-05-09 12:42:33 -05:00
Don't block UI while running actions
This commit is contained in:
parent
a28b800228
commit
a4bbf1e596
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user