src/core/android/SDL_android.cpp
changeset 7095 79ca4d26d4b3
parent 7083 0cb47cc139d3
child 7130 28df4f1a1712
equal deleted inserted replaced
7094:330d3bb2476d 7095:79ca4d26d4b3
  1128 extern "C" void *SDL_AndroidGetJNIEnv()
  1128 extern "C" void *SDL_AndroidGetJNIEnv()
  1129 {
  1129 {
  1130     return Android_JNI_GetEnv();
  1130     return Android_JNI_GetEnv();
  1131 }
  1131 }
  1132 
  1132 
  1133 /*
  1133 
  1134  * The jobject returned by SDL_AndroidGetActivity is a local reference.
       
  1135  * It is the caller's responsibility to properly release it
       
  1136  * (using LocalReferenceHolder or manually with env->DeleteLocalRef)
       
  1137  */
       
  1138 
  1134 
  1139 extern "C" void *SDL_AndroidGetActivity()
  1135 extern "C" void *SDL_AndroidGetActivity()
  1140 {
  1136 {
       
  1137     /* See SDL_system.h for caveats on using this function. */
       
  1138     
  1141     jmethodID mid;
  1139     jmethodID mid;
  1142 
  1140 
  1143     JNIEnv *env = Android_JNI_GetEnv();
  1141     JNIEnv *env = Android_JNI_GetEnv();
  1144     if (!env) {
  1142     if (!env) {
  1145         return NULL;
  1143         return NULL;