Avoid releasing main thread identity on platforms that don't need to drop it, making it a platform detail.
(cherry picked from commit 92cb8246a5b67b36482ea597f23773984f53cf37)
This commit is contained in:
1 parent
17cd7dbac7
commit
a30e7e1151
2 files changed
+5
-3
No files matched your search
@@ -2924,9 +2924,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
|
||||
message_queue = memnew(MessageQueue);
|
||||
|
||||
Thread::release_main_thread(); // If setup2() is called from another thread, that one will become main thread, so preventively release this one.
|
||||
set_current_thread_safe_for_nodes(false);
|
||||
|
||||
#if defined(STEAMAPI_ENABLED)
|
||||
if (editor || project_manager) {
|
||||
steam_tracker = memnew(SteamTracker);
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
#include "core/input/input.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/os/thread.h"
|
||||
#include "core/os/thread_safe.h"
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "main/main.h"
|
||||
#include "servers/camera/camera_server.h"
|
||||
@@ -230,6 +232,9 @@ JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env
|
||||
return false;
|
||||
}
|
||||
|
||||
Thread::release_main_thread(); // setup2 will be called from another thread.
|
||||
set_current_thread_safe_for_nodes(false);
|
||||
|
||||
TTS_Android::setup(p_godot_tts);
|
||||
|
||||
java_class_wrapper = memnew(JavaClassWrapper);
|
||||
|
||||
Reference in new issue
Block a user