Moved warning about SDL_AndroidGetActivity to SDL_system.h
authorGabriel Jacobo <gabomdq@gmail.com>
Tue, 23 Apr 2013 16:44:54 -0300
changeset 709579ca4d26d4b3
parent 7094 330d3bb2476d
child 7096 640f553441e4
Moved warning about SDL_AndroidGetActivity to SDL_system.h
include/SDL_system.h
src/core/android/SDL_android.cpp
     1.1 --- a/include/SDL_system.h	Tue Apr 23 08:19:21 2013 -0700
     1.2 +++ b/include/SDL_system.h	Tue Apr 23 16:44:54 2013 -0300
     1.3 @@ -62,6 +62,9 @@
     1.4  
     1.5  /* Get the SDL Activity object for the application
     1.6     This returns jobject, but the prototype is void* so we don't need jni.h
     1.7 +   The jobject returned by SDL_AndroidGetActivity is a local reference.
     1.8 +   It is the caller's responsibility to properly release it
     1.9 +   (using LocalReferenceHolder or manually with env->DeleteLocalRef)
    1.10   */
    1.11  extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
    1.12  
     2.1 --- a/src/core/android/SDL_android.cpp	Tue Apr 23 08:19:21 2013 -0700
     2.2 +++ b/src/core/android/SDL_android.cpp	Tue Apr 23 16:44:54 2013 -0300
     2.3 @@ -1130,14 +1130,12 @@
     2.4      return Android_JNI_GetEnv();
     2.5  }
     2.6  
     2.7 -/*
     2.8 - * The jobject returned by SDL_AndroidGetActivity is a local reference.
     2.9 - * It is the caller's responsibility to properly release it
    2.10 - * (using LocalReferenceHolder or manually with env->DeleteLocalRef)
    2.11 - */
    2.12 +
    2.13  
    2.14  extern "C" void *SDL_AndroidGetActivity()
    2.15  {
    2.16 +    /* See SDL_system.h for caveats on using this function. */
    2.17 +    
    2.18      jmethodID mid;
    2.19  
    2.20      JNIEnv *env = Android_JNI_GetEnv();