mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-18 19:41:01 +01:00
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.
This commit is contained in:
parent
c8e8c614a0
commit
2600ac65c8
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <android/native_window_jni.h>
|
#include <android/native_window_jni.h>
|
||||||
|
|
||||||
|
#include "common/android/id_cache.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "input_common/drivers/touch_screen.h"
|
#include "input_common/drivers/touch_screen.h"
|
||||||
#include "input_common/drivers/virtual_amiibo.h"
|
#include "input_common/drivers/virtual_amiibo.h"
|
||||||
|
@ -60,7 +61,8 @@ void EmuWindow_Android::OnRemoveNfcTag() {
|
||||||
|
|
||||||
void EmuWindow_Android::OnFrameDisplayed() {
|
void EmuWindow_Android::OnFrameDisplayed() {
|
||||||
if (!m_first_frame) {
|
if (!m_first_frame) {
|
||||||
EmulationSession::GetInstance().OnEmulationStarted();
|
Common::Android::RunJNIOnFiber<void>(
|
||||||
|
[&](JNIEnv* env) { EmulationSession::GetInstance().OnEmulationStarted(); });
|
||||||
m_first_frame = true;
|
m_first_frame = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue