提交 5fc21edc 编写于 作者: J jp9000

UI: Clear scene data before loading new scene data

Clear scene data before loading new scene files or when creating new
scene data from scratch.
上级 1d3251a9
......@@ -348,6 +348,8 @@ void OBSBasic::CreateDefaultScene()
bool hasDesktopAudio = HasAudioDevices(App()->OutputAudioSource());
bool hasInputAudio = HasAudioDevices(App()->InputAudioSource());
ClearSceneData();
obs_scene_t *scene = obs_scene_create(Str("Basic.Scene"));
obs_source_t *source = obs_scene_get_source(scene);
......@@ -418,6 +420,8 @@ void OBSBasic::Load(const char *file)
return;
}
ClearSceneData();
obs_data_t *data = obs_data_create_from_json(jsonData);
obs_data_array_t *sceneOrder = obs_data_get_array(data, "scene_order");
obs_data_array_t *sources = obs_data_get_array(data, "sources");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册