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.
This commit is contained in:
Pedro J. Estébanez 2017-08-22 17:21:41 +02:00
parent 39c6b3d942
commit 2a5ee5dec9
3 changed files with 10 additions and 4 deletions

View file

@ -1008,7 +1008,9 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("JavaClassWrapper", java_class_wrapper));
_initialize_java_modules();
Main::setup2();
// Since Godot is initialized on the UI thread, _main_thread_id was set to that thread's id,
// but for Godot purposes, the main thread is the one running the game loop
Main::setup2(Thread::get_caller_id());
++step;
suspend_mutex->unlock();
input_mutex->unlock();