Commit 73b21090 authored by Tim Angus's avatar Tim Angus

* Take a global reference to the activity to prevent the reference being GCed

parent 296e78b6
...@@ -96,7 +96,7 @@ extern "C" void SDL_Android_Init(JNIEnv* env, jclass cls) ...@@ -96,7 +96,7 @@ extern "C" void SDL_Android_Init(JNIEnv* env, jclass cls)
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL_Android_Init()"); __android_log_print(ANDROID_LOG_INFO, "SDL", "SDL_Android_Init()");
mEnv = env; mEnv = env;
mActivityClass = cls; mActivityClass = (jclass)env->NewGlobalRef(cls);
midCreateGLContext = mEnv->GetStaticMethodID(mActivityClass, midCreateGLContext = mEnv->GetStaticMethodID(mActivityClass,
"createGLContext","(II)Z"); "createGLContext","(II)Z");
......
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