diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-12-19 21:27:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-19 21:27:59 +0100 |
commit | 2a4c528d067826dd1af865c93c3dc945c9a0e196 (patch) | |
tree | b79ad41c92491e744b37736a0478b48b8361347d | |
parent | 30ffd273a311745fbc241d2ff542da72a58d0dee (diff) | |
parent | f3c6c63b9402683d5060d101c60d2ce9d3db7716 (diff) |
Merge pull request #34465 from neikeq/no-hardcode-debugger-wait
Mono/C#: Remove hard-coded debugger wait at initialization
-rw-r--r-- | modules/mono/mono_gd/gd_mono.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp index 29274be559..6cafa6709f 100644 --- a/modules/mono/mono_gd/gd_mono.cpp +++ b/modules/mono/mono_gd/gd_mono.cpp @@ -119,28 +119,6 @@ void gd_mono_profiler_init() { #if defined(DEBUG_ENABLED) -bool gd_mono_wait_for_debugger_msecs(uint32_t p_msecs) { - - do { - if (mono_is_debugger_attached()) - return true; - - int last_tick = OS::get_singleton()->get_ticks_msec(); - - OS::get_singleton()->delay_usec((p_msecs < 25 ? p_msecs : 25) * 1000); - - uint32_t tdiff = OS::get_singleton()->get_ticks_msec() - last_tick; - - if (tdiff > p_msecs) { - p_msecs = 0; - } else { - p_msecs -= tdiff; - } - } while (p_msecs > 0); - - return mono_is_debugger_attached(); -} - void gd_mono_debug_init() { mono_debug_init(MONO_DEBUG_FORMAT_MONO); @@ -402,12 +380,6 @@ void GDMono::initialize() { Error domain_load_err = _load_scripts_domain(); ERR_FAIL_COND_MSG(domain_load_err != OK, "Mono: Failed to load scripts domain."); -#if defined(DEBUG_ENABLED) && !defined(JAVASCRIPT_ENABLED) - bool debugger_attached = gd_mono_wait_for_debugger_msecs(500); - if (!debugger_attached && OS::get_singleton()->is_stdout_verbose()) - print_error("Mono: Debugger wait timeout"); -#endif - _register_internal_calls(); print_verbose("Mono: INITIALIZED"); |