mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Fix studio mode always duplicating scene
If scene duplication mode is disabled and studio mode is turned on, it would always initially duplicate scene regardless of whether scene duplication mode was activated or not.
This commit is contained in:
@@ -755,10 +755,16 @@ void OBSBasic::SetPreviewProgramMode(bool enabled)
|
||||
|
||||
OBSScene curScene = GetCurrentScene();
|
||||
|
||||
obs_scene_t *dup = obs_scene_duplicate(curScene, nullptr,
|
||||
editPropertiesMode ?
|
||||
OBS_SCENE_DUP_PRIVATE_COPY :
|
||||
OBS_SCENE_DUP_PRIVATE_REFS);
|
||||
obs_scene_t *dup;
|
||||
if (sceneDuplicationMode) {
|
||||
dup = obs_scene_duplicate(curScene, nullptr,
|
||||
editPropertiesMode ?
|
||||
OBS_SCENE_DUP_PRIVATE_COPY :
|
||||
OBS_SCENE_DUP_PRIVATE_REFS);
|
||||
} else {
|
||||
dup = curScene;
|
||||
obs_scene_addref(dup);
|
||||
}
|
||||
|
||||
obs_source_t *transition = obs_get_output_source(0);
|
||||
obs_source_t *dup_source = obs_scene_get_source(dup);
|
||||
|
||||
Reference in New Issue
Block a user