Fixed screen staying black sometimes after restoring app from background
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
2
todo.txt
2
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.
|
||||
|
||||
Reference in New Issue
Block a user