attach jni to ui thread, fix bucket bounding box
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
void android_async_lock(struct engine* engine);
|
||||
void android_async_swap(struct engine* engine);
|
||||
void android_async_unlock(struct engine* engine);
|
||||
void android_attach_jni();
|
||||
void android_detach_jni();
|
||||
#elif _WIN32
|
||||
bool async_lock_try();
|
||||
void async_lock();
|
||||
@@ -853,6 +855,10 @@ void App::ui_thread_main()
|
||||
ui_thread_id = std::this_thread::get_id();
|
||||
ui_running = true;
|
||||
|
||||
#if __ANDROID__
|
||||
android_attach_jni();
|
||||
#endif
|
||||
|
||||
init();
|
||||
|
||||
auto t_start = std::chrono::high_resolution_clock::now();
|
||||
@@ -922,6 +928,9 @@ void App::ui_thread_main()
|
||||
rendered_frames++;
|
||||
}
|
||||
}
|
||||
#if __ANDROID__
|
||||
android_detach_jni();
|
||||
#endif
|
||||
}
|
||||
|
||||
void App::render_thread_start()
|
||||
|
||||
Reference in New Issue
Block a user