diff options
| author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-08-22 17:21:41 +0200 |
|---|---|---|
| committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-08-22 17:24:20 +0200 |
| commit | 2a5ee5dec93b768f6caeb109be2a052ca610e747 (patch) | |
| tree | ee7b644e2b71183e8b9c276e894fffcbf6b0c554 /main | |
| parent | 39c6b3d942e1b872538cd062347d5a5631f57f05 (diff) | |
| download | redot-engine-2a5ee5dec93b768f6caeb109be2a052ca610e747.tar.gz | |
Fix Android remote debug not hitting breakpoints
A change in `Main`'s API is needed. Please read the comment in the diff for an explanation.
Diffstat (limited to 'main')
| -rw-r--r-- | main/main.cpp | 7 | ||||
| -rw-r--r-- | main/main.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp index e49c66dddf..425e736d93 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -69,7 +69,6 @@ #include "core/io/file_access_zip.h" #include "core/io/stream_peer_ssl.h" #include "core/io/stream_peer_tcp.h" -#include "core/os/thread.h" #include "main/input_default.h" #include "performance.h" #include "translation.h" @@ -886,7 +885,11 @@ error: return ERR_INVALID_PARAMETER; } -Error Main::setup2() { +Error Main::setup2(Thread::ID p_main_tid_override) { + + if (p_main_tid_override) { + Thread::_main_thread_id = p_main_tid_override; + } OS::get_singleton()->initialize(video_mode, video_driver_idx, audio_driver_idx); if (init_use_custom_pos) { diff --git a/main/main.h b/main/main.h index ca96e397ca..98f46c13c6 100644 --- a/main/main.h +++ b/main/main.h @@ -34,6 +34,7 @@ @author Juan Linietsky <reduzio@gmail.com> */ +#include "core/os/thread.h" #include "error_list.h" #include "typedefs.h" @@ -49,7 +50,7 @@ class Main { public: static Error setup(const char *execpath, int argc, char *argv[], bool p_second_phase = true); - static Error setup2(); + static Error setup2(Thread::ID p_main_tid_override = 0); static bool start(); static bool iteration(); static void cleanup(); |
