Преглед изворни кода

UI: Create default scene if no file found

jp9000 пре 10 година
родитељ
комит
44b34431be
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      obs/window-basic-main.cpp

+ 3 - 1
obs/window-basic-main.cpp

@@ -444,7 +444,9 @@ void OBSBasic::CleanupUnusedSources()
 void OBSBasic::Load(const char *file)
 void OBSBasic::Load(const char *file)
 {
 {
 	if (!file || !os_file_exists(file)) {
 	if (!file || !os_file_exists(file)) {
-		blog(LOG_ERROR, "Could not find file %s", file);
+		blog(LOG_INFO, "No scene file found, creating default scene");
+		CreateDefaultScene();
+		SaveProject();
 		return;
 		return;
 	}
 	}