summaryrefslogtreecommitdiffstats
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 0a9ebd4c61..7efd503f95 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -570,9 +570,15 @@ Error Main::test_setup() {
ResourceLoader::load_path_remaps();
+ // Initialize ThemeDB early so that scene types can register their theme items.
+ // Default theme will be initialized later, after modules and ScriptServer are ready.
+ initialize_theme_db();
+
register_scene_types();
register_driver_types();
+ register_scene_singletons();
+
initialize_modules(MODULE_INITIALIZATION_LEVEL_SCENE);
GDExtensionManager::get_singleton()->initialize_extensions(GDExtension::INITIALIZATION_LEVEL_SCENE);
@@ -588,9 +594,7 @@ Error Main::test_setup() {
register_platform_apis();
// Theme needs modules to be initialized so that sub-resources can be loaded.
- initialize_theme_db();
- theme_db->initialize_theme();
- register_scene_singletons();
+ theme_db->initialize_theme_noproject();
initialize_navigation_server();
@@ -2561,9 +2565,15 @@ Error Main::setup2() {
OS::get_singleton()->benchmark_begin_measure("scene");
+ // Initialize ThemeDB early so that scene types can register their theme items.
+ // Default theme will be initialized later, after modules and ScriptServer are ready.
+ initialize_theme_db();
+
register_scene_types();
register_driver_types();
+ register_scene_singletons();
+
initialize_modules(MODULE_INITIALIZATION_LEVEL_SCENE);
GDExtensionManager::get_singleton()->initialize_extensions(GDExtension::INITIALIZATION_LEVEL_SCENE);
@@ -2581,11 +2591,6 @@ Error Main::setup2() {
register_platform_apis();
- // Theme needs modules to be initialized so that sub-resources can be loaded.
- // Default theme is initialized later, after ScriptServer is ready.
- initialize_theme_db();
- register_scene_singletons();
-
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/mouse_cursor/custom_image", PROPERTY_HINT_FILE, "*.png,*.webp"), String());
GLOBAL_DEF_BASIC("display/mouse_cursor/custom_image_hotspot", Vector2());
GLOBAL_DEF_BASIC("display/mouse_cursor/tooltip_position_offset", Point2(10, 10));