Browse Source

Don't save project on startup in headless or no-window mode

(cherry picked from commit ea2489ce937d95f7103332c717c96aeb60d83271)
kobewi 4 năm trước cách đây
mục cha
commit
1f87904366
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      editor/editor_node.cpp

+ 4 - 2
editor/editor_node.cpp

@@ -514,8 +514,10 @@ void EditorNode::_notification(int p_what) {
 
 			_update_debug_options();
 
-			// Save the project after opening to mark it as last modified.
-			ProjectSettings::get_singleton()->save();
+			// Save the project after opening to mark it as last modified, except in headless mode.
+			if (OS::get_singleton()->can_draw() && !OS::get_singleton()->is_no_window_mode_enabled()) {
+				ProjectSettings::get_singleton()->save();
+			}
 
 			/* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
 		} break;