diff -r dbc789caf67b src/core/android/SDL_android.cpp --- a/src/core/android/SDL_android.cpp jue dic 15 11:09:28 2011 -0300 +++ b/src/core/android/SDL_android.cpp vie dic 23 17:45:01 2011 -0300 @@ -167,6 +167,25 @@ SDL_SendQuit(); } +// Pause +extern "C" void Java_org_libsdl_app_SDLActivity_nativePause( + JNIEnv* env, jclass cls) +{ + if (Android_Window) { + Android_Window->flags &= ~SDL_WINDOW_SHOWN; + Android_Window->flags &= ~SDL_WINDOW_INPUT_FOCUS; + } +} + +extern "C" void Java_org_libsdl_app_SDLActivity_nativeResume( + JNIEnv* env, jclass cls) +{ + if (Android_Window) { + Android_Window->flags |= SDL_WINDOW_SHOWN; + Android_Window->flags |= SDL_WINDOW_INPUT_FOCUS; + } +} + extern "C" void Java_org_libsdl_app_SDLActivity_nativeRunAudioThread( JNIEnv* env, jclass cls) { diff -r dbc789caf67b src/main/android/SDL_android_main.cpp --- a/src/main/android/SDL_android_main.cpp jue dic 15 11:09:28 2011 -0300 +++ b/src/main/android/SDL_android_main.cpp vie dic 23 17:45:01 2011 -0300 @@ -33,8 +33,8 @@ argv[1] = NULL; status = SDL_main(1, argv); - /* We exit here for consistency with other platforms. */ - exit(status); + /* Do not issue an exit or the whole application will terminate instead of just the SDL thread */ + //exit(status); } #endif /* __ANDROID__ */