Просмотр исходного кода

UI: Create default scene if no file found

jp9000 10 лет назад
Родитель
Сommit
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)
 {
 	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;
 	}