Commit 4fe3142e authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Added method to set Android JavaVM from JNIEnv

parent 77823fac
...@@ -42,7 +42,12 @@ void _android_key_cleanup(void *data){ ...@@ -42,7 +42,12 @@ void _android_key_cleanup(void *data){
} }
#endif #endif
void ms_set_jvm_from_env(JNIEnv *env){
(*env)->GetJavaVM(env, &ms2_vm);
#ifndef _WIN32
pthread_key_create(&jnienv_key,_android_key_cleanup);
#endif
}
void ms_set_jvm(JavaVM *vm){ void ms_set_jvm(JavaVM *vm){
ms2_vm=vm; ms2_vm=vm;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment