mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-22 00:05:16 -05:00
prevent idle switch loop when using previous scene as target
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -198,6 +198,7 @@ struct IdleData
|
||||
OBSWeakSource scene;
|
||||
OBSWeakSource transition;
|
||||
bool usePreviousScene;
|
||||
bool alreadySwitched = false;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user