mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-20 18:59:26 +02:00
2026-09-27 17:50:19
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
a4fd5c6b0b
commit
d336341c8d
1 changed files with 3 additions and 3 deletions
|
|
@ -107,14 +107,14 @@ namespace Common::Android {
|
|||
JNIEnv *GetEnvForThread() {
|
||||
thread_local static struct OwnedEnv {
|
||||
OwnedEnv() {
|
||||
status = s_java_vm->GetEnv(reinterpret_cast<void **>(&env), JNI_VERSION_1_6);
|
||||
status = state.java_vm->GetEnv(reinterpret_cast<void **>(&env), JNI_VERSION_1_6);
|
||||
if (status == JNI_EDETACHED)
|
||||
s_java_vm->AttachCurrentThread(&env, nullptr);
|
||||
state.java_vm->AttachCurrentThread(&env, nullptr);
|
||||
}
|
||||
|
||||
~OwnedEnv() {
|
||||
if (status == JNI_EDETACHED)
|
||||
s_java_vm->DetachCurrentThread();
|
||||
state.java_vm->DetachCurrentThread();
|
||||
}
|
||||
|
||||
int status;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue