Fixes #1422, restores GL context automatically under Android
This commit is contained in:
parent
b2b4372f55
commit
8fbd4fb107
7 changed files with 77 additions and 10 deletions
|
@ -73,6 +73,24 @@ android-project/
|
|||
src/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding to SDL. Be very careful changing this, as the SDL library relies on this implementation.
|
||||
|
||||
|
||||
================================================================================
|
||||
Pause / Resume behaviour
|
||||
================================================================================
|
||||
|
||||
If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined, the event loop will
|
||||
block itself when the app is paused (ie, when the user returns to the main
|
||||
Android dashboard). Blocking is better in terms of battery use, and it allows your
|
||||
app to spring back to life instantaneously after resume (versus polling for
|
||||
a resume message).
|
||||
Upon resume, SDL will attempt to restore the GL context automatically.
|
||||
In modern devices (Android 3.0 and up) this will most likely succeed and your
|
||||
app can continue to operate as it was.
|
||||
However, there's a chance (on older hardware, or on systems under heavy load),
|
||||
where the GL context can not be restored. In that case you have to listen for
|
||||
a specific message, (which is not yet implemented!) and restore your textures
|
||||
manually or quit the app (which is actually the kind of behaviour you'll see
|
||||
under iOS, if the OS can not restore your GL context it will just kill your app)
|
||||
|
||||
================================================================================
|
||||
Additional documentation
|
||||
================================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue