diff --git a/idle-switch.cpp b/idle-switch.cpp index e8ff2796..99a12918 100644 --- a/idle-switch.cpp +++ b/idle-switch.cpp @@ -41,10 +41,15 @@ void SwitcherData::checkIdleSwitch(bool& match, OBSWeakSource& scene, OBSWeakSou if (!ignoreIdle && secondsSinceLastInput() > idleData.time) { + if (idleData.alreadySwitched) + return; scene = (idleData.usePreviousScene) ? previousScene : idleData.scene; transition = idleData.transition; match = true; + idleData.alreadySwitched = true; } + else + idleData.alreadySwitched = false; } void SceneSwitcher::on_idleCheckBox_stateChanged(int state) diff --git a/switcher-data-structs.hpp b/switcher-data-structs.hpp index a790654b..f145a202 100644 --- a/switcher-data-structs.hpp +++ b/switcher-data-structs.hpp @@ -198,6 +198,7 @@ struct IdleData OBSWeakSource scene; OBSWeakSource transition; bool usePreviousScene; + bool alreadySwitched = false; }; typedef enum {