UI: Reset VCam when clearing scene data
This commit is contained in:
parent
809feb3ddf
commit
dfc35603cf
3 changed files with 18 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue