Route UI thread lifecycle through platform services

This commit is contained in:
2026-06-03 04:45:02 +02:00
parent dd641c047b
commit f3925f8423
10 changed files with 79 additions and 15 deletions

View File

@@ -20,8 +20,6 @@
void android_async_lock();
void android_async_swap();
void android_async_unlock();
void android_attach_jni();
void android_detach_jni();
#elif _WIN32
bool async_lock_try();
void async_lock();
@@ -1083,9 +1081,7 @@ void App::ui_thread_main()
ui_thread_id = std::this_thread::get_id();
ui_running = true;
#if __ANDROID__
android_attach_jni();
#endif
attach_ui_thread();
LOG("ui thread init()");
init();
@@ -1169,9 +1165,7 @@ void App::ui_thread_main()
rendered_frames++;
}
}
#if __ANDROID__
android_detach_jni();
#endif
detach_ui_thread();
}
void App::render_thread_start()