diff options
author | t895 <[email protected]> | 2024-02-05 06:49:01 -0500 |
---|---|---|
committer | t895 <[email protected]> | 2024-02-08 14:13:46 -0500 |
commit | 2600ac65c8101c69988f2506739e6ddef05b23c7 (patch) | |
tree | 286b6e4beb914b46c548a56e1cb4424a095d4124 /src/android | |
parent | c8e8c614a059761d9bebd91c12ab79698493f019 (diff) | |
download | yuzu-mainline-2600ac65c8101c69988f2506739e6ddef05b23c7.tar.gz yuzu-mainline-2600ac65c8101c69988f2506739e6ddef05b23c7.zip |
android: Run OnEmulationStarted frontend callback in another thread
The JVM has problems with attaching to a Fiber so we start a new thread and wait for the result here.
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/app/src/main/jni/emu_window/emu_window.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/android/app/src/main/jni/emu_window/emu_window.cpp b/src/android/app/src/main/jni/emu_window/emu_window.cpp index c4f631924..c927cddda 100644 --- a/src/android/app/src/main/jni/emu_window/emu_window.cpp +++ b/src/android/app/src/main/jni/emu_window/emu_window.cpp @@ -3,6 +3,7 @@ #include <android/native_window_jni.h> +#include "common/android/id_cache.h" #include "common/logging/log.h" #include "input_common/drivers/touch_screen.h" #include "input_common/drivers/virtual_amiibo.h" @@ -60,7 +61,8 @@ void EmuWindow_Android::OnRemoveNfcTag() { void EmuWindow_Android::OnFrameDisplayed() { if (!m_first_frame) { - EmulationSession::GetInstance().OnEmulationStarted(); + Common::Android::RunJNIOnFiber<void>( + [&](JNIEnv* env) { EmulationSession::GetInstance().OnEmulationStarted(); }); m_first_frame = true; } } |