src/core/android/SDL_android.cpp
changeset 6186 e565ac981de6
parent 6138 4c64952a58fb
child 6189 b5a665fbaedc
     1.1 --- a/src/core/android/SDL_android.cpp	Sun Jan 08 00:39:41 2012 -0500
     1.2 +++ b/src/core/android/SDL_android.cpp	Sun Jan 08 01:05:25 2012 -0500
     1.3 @@ -167,6 +167,26 @@
     1.4      SDL_SendQuit();
     1.5  }
     1.6  
     1.7 +// Pause
     1.8 +extern "C" void Java_org_libsdl_app_SDLActivity_nativePause(
     1.9 +                                    JNIEnv* env, jclass cls)
    1.10 +{
    1.11 +    if (Android_Window) {
    1.12 +        SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_HIDDEN, 0, 0);
    1.13 +        SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_LOST, 0, 0);
    1.14 +    }
    1.15 +}
    1.16 +
    1.17 +// Resume
    1.18 +extern "C" void Java_org_libsdl_app_SDLActivity_nativeResume(
    1.19 +                                    JNIEnv* env, jclass cls)
    1.20 +{
    1.21 +    if (Android_Window) {
    1.22 +        SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_SHOWN, 0, 0);
    1.23 +        SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0);
    1.24 +    }
    1.25 +}
    1.26 +
    1.27  extern "C" void Java_org_libsdl_app_SDLActivity_nativeRunAudioThread(
    1.28                                      JNIEnv* env, jclass cls)
    1.29  {