UI: Use empty scene for new scene collection

The user may not want their audio or their display to be captured when
creating a new scene collection.  Make new scene collections default to
fully empty.
This commit is contained in:
jp9000 2015-09-11 21:51:09 -07:00
parent 35b2ce565a
commit 01e7a3c621
3 changed files with 7 additions and 6 deletions

View File

@ -165,7 +165,7 @@ void OBSBasic::AddSceneCollection(bool create_new)
config_set_string(App()->GlobalConfig(), "Basic", "SceneCollectionFile",
file.c_str());
if (create_new) {
CreateDefaultScene();
CreateDefaultScene(false);
}
SaveProjectNow();
RefreshSceneCollections();

View File

@ -384,7 +384,7 @@ void OBSBasic::CreateFirstRunSources(obs_scene_t *scene)
Str("Basic.AuxDevice1"), 3);
}
void OBSBasic::CreateDefaultScene()
void OBSBasic::CreateDefaultScene(bool firstStart)
{
disableSaving++;
@ -395,7 +395,8 @@ void OBSBasic::CreateDefaultScene()
obs_add_source(source);
CreateFirstRunSources(scene);
if (firstStart)
CreateFirstRunSources(scene);
obs_set_output_source(0, obs_scene_get_source(scene));
obs_scene_release(scene);
@ -460,7 +461,7 @@ void OBSBasic::Load(const char *file)
{
if (!file || !os_file_exists(file)) {
blog(LOG_INFO, "No scene file found, creating default scene");
CreateDefaultScene();
CreateDefaultScene(true);
SaveProject();
return;
}
@ -472,7 +473,7 @@ void OBSBasic::Load(const char *file)
disableSaving--;
blog(LOG_ERROR, "Failed to load '%s', creating default scene",
file);
CreateDefaultScene();
CreateDefaultScene(true);
SaveProject();
return;
}

View File

@ -114,7 +114,7 @@ private:
void SetupEncoders();
void CreateFirstRunSources(obs_scene_t *scene);
void CreateDefaultScene();
void CreateDefaultScene(bool firstStart);
void ClearVolumeControls();