mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-07-19 01:15:14 -05:00
Fix scene switch action aborting macro execution
abortMacroWait was not reset in waitForTransitionChangeFixedDuration() leading to the scene switch action returning false
This commit is contained in:
parent
e43793354e
commit
ebdbb9011f
|
|
@ -31,7 +31,6 @@ void waitForTransitionChangeFixedDuration(int duration)
|
|||
auto time = std::chrono::high_resolution_clock::now() +
|
||||
std::chrono::milliseconds(duration);
|
||||
|
||||
switcher->abortMacroWait = false;
|
||||
std::unique_lock<std::mutex> lock(switcher->m);
|
||||
while (!switcher->abortMacroWait) {
|
||||
if (switcher->macroTransitionCv.wait_until(lock, time) ==
|
||||
|
|
@ -107,6 +106,7 @@ bool MacroActionSwitchScene::PerformAction()
|
|||
const int expectedTransitionDuration =
|
||||
getExpectedTransitionDuration(scene, transition,
|
||||
_duration.seconds);
|
||||
switcher->abortMacroWait = false;
|
||||
if (expectedTransitionDuration < 0) {
|
||||
waitForTransitionChange(transition);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user