summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorPaulo Poiati <paulogpoiati@gmail.com>2022-02-16 14:02:38 -0300
committerPaulo Poiati <paulogpoiati@gmail.com>2022-02-20 10:58:46 -0300
commitfe95aa2c90ddd9116f545c77e00cb5eec99fe486 (patch)
treef4a5a58a2ba97419fd2f1244b6080ed07062082d /main
parent499eec13a3660f6f05a6212be97ea164fd98b519 (diff)
Fix extension registration order.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 21199fe227..a68792105e 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -487,6 +487,7 @@ void Main::test_cleanup() {
}
unregister_core_driver_types();
+ unregister_core_extensions();
unregister_core_types();
OS::get_singleton()->finalize_core();
@@ -634,7 +635,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
continue;
}
#endif
-
List<String>::Element *N = I->next();
if (I->get() == "-h" || I->get() == "--help" || I->get() == "/?") { // display help
@@ -1157,6 +1157,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// Initialize user data dir.
OS::get_singleton()->ensure_user_data_dir();
+ register_core_extensions(); // core extensions must be registered after globals setup and before display
+
ResourceUID::get_singleton()->load_from_cache(); // load UUIDs from cache.
GLOBAL_DEF("memory/limits/multithreaded_server/rid_pool_prealloc", 60);
@@ -1272,7 +1274,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->set_cmdline(execpath, main_args);
- register_core_extensions(); //before display
// possibly be worth changing the default from vulkan to something lower spec,
// for the project manager, depending on how smooth the fallback is.
GLOBAL_DEF_RST("rendering/driver/driver_name", "vulkan");
@@ -1529,6 +1530,7 @@ error:
}
unregister_core_driver_types();
+ unregister_core_extensions();
unregister_core_types();
OS::get_singleton()->_cmdline.clear();
@@ -2888,6 +2890,7 @@ void Main::cleanup(bool p_force) {
memdelete(message_queue);
unregister_core_driver_types();
+ unregister_core_extensions();
unregister_core_types();
OS::get_singleton()->finalize_core();