diff --git a/src/main/jni/vloader.cpp b/src/main/jni/vloader.cpp index 7ca6a5ea..9c775603 100644 --- a/src/main/jni/vloader.cpp +++ b/src/main/jni/vloader.cpp @@ -53,7 +53,9 @@ Java_org_vivecraft_util_VLoader_getEGLConfig(JNIEnv* env, jclass clazz) { extern "C" JNIEXPORT void JNICALL Java_org_vivecraft_util_VLoader_setupAndroid(JNIEnv* env, jclass clazz) { - pojav_environ->dalvikJNIEnvPtr_ANDROID->CallStaticVoidMethod(pojav_environ->bridgeClazz, pojav_environ->method_stopXR); + JNIEnv *newEnv; + pojav_environ->dalvikJavaVMPtr->AttachCurrentThread(&newEnv, NULL); + newEnv->CallStaticVoidMethod(newEnv->FindClass("org/lwjgl/glfw/CallbackBridge"), pojav_environ->method_stopXR); } extern "C"