diff --git a/project/java/Video.java b/project/java/Video.java index b7733aef1..fb1cf0f2e 100644 --- a/project/java/Video.java +++ b/project/java/Video.java @@ -1004,10 +1004,10 @@ class DemoGLSurfaceView extends GLSurfaceView_SDL { if(mRenderer.mPaused) return; mRenderer.mPaused = true; + super.onPause(); mRenderer.nativeGlContextLostAsyncEvent(); if( mRenderer.accelerometer != null ) // For some reason it crashes here often - are we getting this event before initialization? mRenderer.accelerometer.stop(); - super.onPause(); }; public boolean isPaused() { diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c index 7cd7911f6..d2f413317 100644 --- a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c +++ b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c @@ -1211,6 +1211,7 @@ void SDL_ANDROID_VideoContextRecreated() ANDROID_UnlockHWSurface(NULL, HwSurfaceList[i]); // Re-fill texture with graphics } } + SDL_ANDROID_CallJavaSwapBuffers(); // Swap buffers once to force screen redraw } }; diff --git a/todo.txt b/todo.txt index 6a1f22053..432305382 100644 --- a/todo.txt +++ b/todo.txt @@ -29,8 +29,6 @@ TODO, which will get actually done - SDL: control mouse with right analog gamepad stick. -- SDL: sometimes the screen stays black after restoring from background. - - XSDL: support Android intent x11://localhost:6000 - http://www.openintents.org/node/905 - XSDL: screen follows mouse when on-screen keyboard is shown.