From 7d0bc9683cd32f4749a6df45ccff4a9eb9f1f330 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 4 Aug 2013 23:38:25 +0200 Subject: [PATCH] Added missing function prototype and changed its signature. Signature was changed to prevent a header for SDL_GLContext. --- src/core/android/SDL_android.c | 4 ++-- src/core/android/SDL_android.h | 1 + src/video/android/SDL_androidgl.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c index 18b700b67..059a2291f 100644 --- a/src/core/android/SDL_android.c +++ b/src/core/android/SDL_android.c @@ -364,9 +364,9 @@ SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion, return success ? SDL_TRUE : SDL_FALSE; } -SDL_bool Android_JNI_DeleteContext(SDL_GLContext context) +SDL_bool Android_JNI_DeleteContext(void) { - /* There's only one context, so the parameter is ignored for now */ + /* There's only one context, so no parameter for now */ JNIEnv *env = Android_JNI_GetEnv(); (*env)->CallStaticVoidMethod(env, mActivityClass, midDeleteGLContext); return SDL_TRUE; diff --git a/src/core/android/SDL_android.h b/src/core/android/SDL_android.h index d53652f88..973f5881f 100644 --- a/src/core/android/SDL_android.h +++ b/src/core/android/SDL_android.h @@ -31,6 +31,7 @@ extern "C" { /* Interface from the SDL library into the Android Java activity */ extern SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion, int red, int green, int blue, int alpha, int buffer, int depth, int stencil, int buffers, int samples); +extern SDL_bool Android_JNI_DeleteContext(void); extern void Android_JNI_SwapWindow(); extern void Android_JNI_SetActivityTitle(const char *title); extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]); diff --git a/src/video/android/SDL_androidgl.c b/src/video/android/SDL_androidgl.c index f4fe55233..6902bc1d0 100644 --- a/src/video/android/SDL_androidgl.c +++ b/src/video/android/SDL_androidgl.c @@ -120,7 +120,7 @@ void Android_GL_DeleteContext(_THIS, SDL_GLContext context) { if (context) { - Android_JNI_DeleteContext(context); + Android_JNI_DeleteContext(); } }