summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorPaulo Poiati <paulogpoiati@gmail.com>2022-02-16 14:02:38 -0300
committerPaulo Poiati <paulogpoiati@gmail.com>2022-02-16 14:46:33 -0300
commit94ef200bab8feb5024b2c64ac14daa24e0c4cc55 (patch)
treec97bc1d5eaa2cef2f8e5496788f55a1285b7389d /main/main.cpp
parentb5c0a892d45b1a9df10aaf0f468252925ea2a4b9 (diff)
Fix extension registration order.
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 21199fe227..f8877d0717 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();
@@ -554,6 +555,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
globals = memnew(ProjectSettings);
register_core_settings(); //here globals are present
+ register_core_extensions(); // core extensions must be registered after core settings and before display
translation_server = memnew(TranslationServer);
performance = memnew(Performance);
@@ -634,7 +636,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
@@ -1271,8 +1272,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
Logger::set_flush_stdout_on_print(ProjectSettings::get_singleton()->get("application/run/flush_stdout_on_print"));
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 +1528,7 @@ error:
}
unregister_core_driver_types();
+ unregister_core_extensions();
unregister_core_types();
OS::get_singleton()->_cmdline.clear();
@@ -2888,6 +2888,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();