Allow switching to already active scene if in studio mode

Preview and program scene can differ in regards to the active scene
items.
Thus it can make sense to switch to the already active scene.
This commit is contained in:
WarmUpTill
2022-02-21 20:08:06 +01:00
committed by WarmUpTill
parent 02e380a9f2
commit c94a791d19
3 changed files with 5 additions and 4 deletions

View File

@@ -343,7 +343,7 @@ bool SwitcherData::checkForMatch(OBSWeakSource &scene,
return match;
}
void switchScene(const sceneSwitchInfo &sceneSwitch)
void switchScene(const sceneSwitchInfo &sceneSwitch, bool force)
{
if (!sceneSwitch.scene && switcher->verbose) {
blog(LOG_INFO, "nothing to switch to");
@@ -353,7 +353,7 @@ void switchScene(const sceneSwitchInfo &sceneSwitch)
obs_source_t *source = obs_weak_source_get_source(sceneSwitch.scene);
obs_source_t *currentSource = obs_frontend_get_current_scene();
if (source && source != currentSource) {
if (source && (source != currentSource || force)) {
transitionData currentTransitionData;
setNextTransition(sceneSwitch, currentSource,
currentTransitionData);