mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-04 10:33:30 +00:00
UI: Don't transition in studio mode if scenes are the same
Fixes an issue where when "Duplicate Scenes" and "Switch Preview/Program after Transitioning" were disabled and preview and program were the same scene, pressing "Transition" would just disable the menus without anything happening. This is because a transition is initiated, but never actually starts transitioning (since both scenes are the same). The check for this already exists, but was only triggered in swapScenesMode. Also renames the newScene variable to lastScene to make it more obvious what it actually is (especially since now, it's not only the new scene anymore).
This commit is contained in:
parent
a8c481a80e
commit
8328609b20
|
@ -359,13 +359,14 @@ void OBSBasic::TransitionToScene(OBSSource source, bool force,
|
|||
lastProgramScene = programScene;
|
||||
programScene = OBSGetWeakRef(source);
|
||||
|
||||
if (swapScenesMode && !force && !black) {
|
||||
OBSSource newScene = OBSGetStrongRef(lastProgramScene);
|
||||
if (!force && !black) {
|
||||
OBSSource lastScene = OBSGetStrongRef(lastProgramScene);
|
||||
|
||||
if (!sceneDuplicationMode && newScene == source)
|
||||
if (!sceneDuplicationMode && lastScene == source)
|
||||
return;
|
||||
|
||||
if (newScene && newScene != GetCurrentSceneSource())
|
||||
if (swapScenesMode && lastScene &&
|
||||
lastScene != GetCurrentSceneSource())
|
||||
swapScene = lastProgramScene;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue