Moved warning about SDL_AndroidGetActivity to SDL_system.h
authorGabriel Jacobo <gabomdq@gmail.com>
Tue, 23 Apr 2013 16:44:54 -0300
changeset 7095 79ca4d26d4b3
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
--- a/include/SDL_system.h	Tue Apr 23 08:19:21 2013 -0700
+++ b/include/SDL_system.h	Tue Apr 23 16:44:54 2013 -0300
@@ -62,6 +62,9 @@
 
 /* Get the SDL Activity object for the application
    This returns jobject, but the prototype is void* so we don't need jni.h
+   The jobject returned by SDL_AndroidGetActivity is a local reference.
+   It is the caller's responsibility to properly release it
+   (using LocalReferenceHolder or manually with env->DeleteLocalRef)
  */
 extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
 
--- a/src/core/android/SDL_android.cpp	Tue Apr 23 08:19:21 2013 -0700
+++ b/src/core/android/SDL_android.cpp	Tue Apr 23 16:44:54 2013 -0300
@@ -1130,14 +1130,12 @@
     return Android_JNI_GetEnv();
 }
 
-/*
- * The jobject returned by SDL_AndroidGetActivity is a local reference.
- * It is the caller's responsibility to properly release it
- * (using LocalReferenceHolder or manually with env->DeleteLocalRef)
- */
+
 
 extern "C" void *SDL_AndroidGetActivity()
 {
+    /* See SDL_system.h for caveats on using this function. */
+    
     jmethodID mid;
 
     JNIEnv *env = Android_JNI_GetEnv();