aboutsummaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorPieter-Jan Briers2018-02-16 16:00:54 +0100
committerHein-Pieter van Braam2018-02-19 22:32:17 +0100
commit4b581104e75a3ce61a5319739943f2e5691ce1c6 (patch)
tree82a380a6b90ad70e02c8442e9d81f142f8702e7c /modules/mono
parentf49601a93485ca05cfb53b6b4e34b1943161278f (diff)
downloadgodot-4b581104e75a3ce61a5319739943f2e5691ce1c6.tar.gz
godot-4b581104e75a3ce61a5319739943f2e5691ce1c6.tar.zst
godot-4b581104e75a3ce61a5319739943f2e5691ce1c6.zip
Makes project manager never initialize mono debug.
The heuristic whether we're in the project manager inside GDMono didn't work if the project manager was launched by not having any path to run. This is fixed now by making a Main::is_project_manager(). (cherry picked from commit 10998380799f25cb3198c62f29e30e743c6013ac)
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index f5febd415..39474f8cb 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -47,6 +47,7 @@
#ifdef TOOLS_ENABLED
#include "../editor/godotsharp_editor.h"
+#include "main/main.h"
#endif
void gdmono_unhandled_exception_hook(MonoObject *exc, void *user_data) {
@@ -94,21 +95,6 @@ static bool _wait_for_debugger_msecs(uint32_t p_msecs) {
}
#endif
-#ifdef TOOLS_ENABLED
-// temporary workaround. should be provided from Main::setup/setup2 instead
-bool _is_project_manager_requested() {
-
- List<String> cmdline_args = OS::get_singleton()->get_cmdline_args();
- for (List<String>::Element *E = cmdline_args.front(); E; E = E->next()) {
- const String &arg = E->get();
- if (arg == "-p" || arg == "--project-manager")
- return true;
- }
-
- return false;
-}
-#endif
-
#ifdef DEBUG_ENABLED
void gdmono_debug_init() {
@@ -121,7 +107,7 @@ void gdmono_debug_init() {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint() ||
ProjectSettings::get_singleton()->get_resource_path().empty() ||
- _is_project_manager_requested()) {
+ Main::is_project_manager()) {
return;
}
#endif