mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-04-12 02:29:03 -04:00
UI: Reset VCam when clearing scene data
This commit is contained in:
@@ -1280,7 +1280,7 @@ retryScene:
|
||||
|
||||
disableSaving--;
|
||||
|
||||
if (vcamEnabled && vcamConfig.internal == VCamInternalType::Preview)
|
||||
if (vcamEnabled)
|
||||
outputHandler->UpdateVirtualCamOutputSource();
|
||||
|
||||
if (api) {
|
||||
@@ -4857,6 +4857,14 @@ void OBSBasic::ClearSceneData()
|
||||
for (int i = 0; i < MAX_CHANNELS; i++)
|
||||
obs_set_output_source(i, nullptr);
|
||||
|
||||
/* Reset VCam to default to clear its private scene and any references
|
||||
* it holds. It will be reconfigured during loading. */
|
||||
if (vcamEnabled) {
|
||||
vcamConfig.type = VCamOutputType::InternalOutput;
|
||||
vcamConfig.internal = VCamInternalType::Default;
|
||||
outputHandler->UpdateVirtualCamOutputSource();
|
||||
}
|
||||
|
||||
lastScene = nullptr;
|
||||
swapScene = nullptr;
|
||||
programScene = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user