summaryrefslogtreecommitdiff
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, 6 insertions, 15 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 0bca5bef0c..38e380568d 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -182,13 +182,6 @@ bool profile_gpu = false;
/* Helper methods */
-// Used by Mono module, should likely be registered in Engine singleton instead
-// FIXME: This is also not 100% accurate, `project_manager` is only true when it was requested,
-// but not if e.g. we fail to load and project and fallback to the manager.
-bool Main::is_project_manager() {
- return project_manager;
-}
-
bool Main::is_cmdline_tool() {
return cmdline_tool;
}
@@ -934,7 +927,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
editor = true;
} else if (I->get() == "-p" || I->get() == "--project-manager") { // starts project manager
-
project_manager = true;
} else if (I->get() == "--debug-server") {
if (I->next()) {
@@ -1203,11 +1195,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
if (editor) {
packed_data->set_disabled(true);
globals->set_disable_feature_overrides(true);
- }
-#endif
-
-#ifdef TOOLS_ENABLED
- if (editor) {
Engine::get_singleton()->set_editor_hint(true);
main_args.push_back("--editor");
if (!init_windowed) {
@@ -1220,6 +1207,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// If we didn't find a project, we fall back to the project manager.
project_manager = !found_project && !cmdline_tool;
}
+
+ if (project_manager) {
+ Engine::get_singleton()->set_project_manager_hint(true);
+ }
#endif
GLOBAL_DEF("debug/file_logging/enable_file_logging", false);
@@ -2789,8 +2780,6 @@ void Main::cleanup(bool p_force) {
ERR_FAIL_COND(!_start_success);
}
- EngineDebugger::deinitialize();
-
ResourceLoader::remove_custom_loaders();
ResourceSaver::remove_custom_savers();
@@ -2833,6 +2822,8 @@ void Main::cleanup(bool p_force) {
unregister_scene_types();
unregister_server_types();
+ EngineDebugger::deinitialize();
+
if (xr_server) {
memdelete(xr_server);
}