Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Moved warning about SDL_AndroidGetActivity to SDL_system.h
Browse files Browse the repository at this point in the history
  • Loading branch information
gabomdq committed Apr 23, 2013
1 parent 1eb5912 commit 0b01a69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions include/SDL_system.h
Expand Up @@ -62,6 +62,9 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();

/* 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();

Expand Down
8 changes: 3 additions & 5 deletions src/core/android/SDL_android.cpp
Expand Up @@ -1130,14 +1130,12 @@ extern "C" void *SDL_AndroidGetJNIEnv()
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();
Expand Down

0 comments on commit 0b01a69

Please sign in to comment.