Fix scene groups not being selected when using more than one entry on the Random tab. (#143)

This commit is contained in:
WarmUpTill
2021-03-18 21:22:33 +01:00
committed by GitHub
parent 2d0a52f8d1
commit 8823c05aeb
2 changed files with 11 additions and 2 deletions

View File

@@ -52,8 +52,15 @@ void SwitcherData::checkRandom(bool &match, OBSWeakSource &scene,
continue;
}
if (r.scene == lastRandomScene && randomSwitches.size() != 1) {
continue;
if (randomSwitches.size() != 1) {
if (r.targetType == SwitchTargetType::Scene &&
r.scene == lastRandomScene) {
continue;
} else if (r.targetType ==
SwitchTargetType::SceneGroup &&
r.group && r.group == lastRandomSceneGroup) {
continue;
}
}
scene = r.getScene();
@@ -61,6 +68,7 @@ void SwitcherData::checkRandom(bool &match, OBSWeakSource &scene,
delay = (int)r.delay * 1000;
match = true;
lastRandomScene = r.scene;
lastRandomSceneGroup = r.group;
if (verbose) {
r.logMatch();