src/core/android/SDL_android.cpp
changeset 5222 c66b2a778b7e
parent 5092 ed1d54f1290a
child 5262 b530ef003506
     1.1 --- a/src/core/android/SDL_android.cpp	Mon Feb 07 16:45:40 2011 -0800
     1.2 +++ b/src/core/android/SDL_android.cpp	Mon Feb 07 17:44:07 2011 -0800
     1.3 @@ -20,6 +20,7 @@
     1.4      slouken@libsdl.org
     1.5  */
     1.6  #include "SDL_config.h"
     1.7 +#include "SDL_stdinc.h"
     1.8  
     1.9  #include "SDL_android.h"
    1.10  
    1.11 @@ -80,7 +81,7 @@
    1.12      mActivityClass = cls;
    1.13  
    1.14      midCreateGLContext = mEnv->GetStaticMethodID(mActivityClass,
    1.15 -                                "createGLContext","()V");
    1.16 +                                "createGLContext","(II)Z");
    1.17      midFlipBuffers = mEnv->GetStaticMethodID(mActivityClass,
    1.18                                  "flipBuffers","()V");
    1.19      midAudioInit = mEnv->GetStaticMethodID(mActivityClass, 
    1.20 @@ -159,9 +160,13 @@
    1.21  /*******************************************************************************
    1.22               Functions called by SDL into Java
    1.23  *******************************************************************************/
    1.24 -extern "C" void Android_JNI_CreateContext()
    1.25 +extern "C" SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion)
    1.26  {
    1.27 -    mEnv->CallStaticVoidMethod(mActivityClass, midCreateGLContext); 
    1.28 +    if (mEnv->CallStaticBooleanMethod(mActivityClass, midCreateGLContext, majorVersion, minorVersion)) {
    1.29 +        return SDL_TRUE;
    1.30 +    } else {
    1.31 +        return SDL_FALSE;
    1.32 +    }
    1.33  }
    1.34  
    1.35  extern "C" void Android_JNI_SwapWindow()