summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2021-11-30 19:09:29 +0300
committerYuri Sizov <yuris@humnom.net>2021-11-30 19:09:29 +0300
commitd567ce3582ab8e77127a3481170b06d3993611d8 (patch)
tree9e8cd05c89f1325766ecbcf3b66fd572748b954f /main
parent2d118bd8b881fe9658e70eb8dc4fa7a6efac41a3 (diff)
Make default/project theme wait for modules before initializing
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index b4fbc1929c..2b048670a8 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -442,6 +442,9 @@ Error Main::test_setup() {
register_module_types();
register_driver_types();
+ // Theme needs modules to be initialized so that sub-resources can be loaded.
+ initialize_theme();
+
ERR_FAIL_COND_V(TextServerManager::get_singleton()->get_interface_count() == 0, ERR_CANT_CREATE);
TextServerManager::get_singleton()->set_primary_interface(TextServerManager::get_singleton()->get_interface(0));
@@ -1882,6 +1885,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
register_platform_apis();
register_module_types();
+ // Theme needs modules to be initialized so that sub-resources can be loaded.
+ initialize_theme();
+
GLOBAL_DEF("display/mouse_cursor/custom_image", String());
GLOBAL_DEF("display/mouse_cursor/custom_image_hotspot", Vector2());
GLOBAL_DEF("display/mouse_cursor/tooltip_position_offset", Point2(10, 10));