mirror of
https://github.com/yawut/SDL.git
synced 2026-04-13 20:36:10 -05:00
* Take a global reference to the activity to prevent the reference being GCed
This commit is contained in:
parent
07f8710f47
commit
e6fb439755
|
|
@ -96,7 +96,7 @@ extern "C" void SDL_Android_Init(JNIEnv* env, jclass cls)
|
|||
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL_Android_Init()");
|
||||
|
||||
mEnv = env;
|
||||
mActivityClass = cls;
|
||||
mActivityClass = (jclass)env->NewGlobalRef(cls);
|
||||
|
||||
midCreateGLContext = mEnv->GetStaticMethodID(mActivityClass,
|
||||
"createGLContext","(II)Z");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user