README.android
changeset 6664 2deb17aefbaf
parent 6657 35de500cc918
child 6678 afb9be20f8d2
equal deleted inserted replaced
6663:2cbffb5aa19d 6664:2deb17aefbaf
   141 
   141 
   142 ================================================================================
   142 ================================================================================
   143  Pause / Resume behaviour
   143  Pause / Resume behaviour
   144 ================================================================================
   144 ================================================================================
   145 
   145 
   146 If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined, the event loop will
   146 If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined (the default),
   147 block itself when the app is paused (ie, when the user returns to the main
   147 the event loop will block itself when the app is paused (ie, when the user
   148 Android dashboard). Blocking is better in terms of battery use, and it allows your
   148 returns to the main Android dashboard). Blocking is better in terms of battery
   149 app to spring back to life instantaneously after resume (versus polling for
   149 use, and it allows your app to spring back to life instantaneously after resume
   150 a resume message).
   150 (versus polling for a resume message).
       
   151 
   151 Upon resume, SDL will attempt to restore the GL context automatically.
   152 Upon resume, SDL will attempt to restore the GL context automatically.
   152 In modern devices (Android 3.0 and up) this will most likely succeed and your
   153 In modern devices (Android 3.0 and up) this will most likely succeed and your
   153 app can continue to operate as it was.
   154 app can continue to operate as it was.
       
   155 
   154 However, there's a chance (on older hardware, or on systems under heavy load),
   156 However, there's a chance (on older hardware, or on systems under heavy load),
   155 where the GL context can not be restored. In that case you have to listen for
   157 where the GL context can not be restored. In that case you have to listen for
   156 a specific message, (which is not yet implemented!) and restore your textures
   158 a specific message, (which is not yet implemented!) and restore your textures
   157 manually or quit the app (which is actually the kind of behaviour you'll see
   159 manually or quit the app (which is actually the kind of behaviour you'll see
   158 under iOS, if the OS can not restore your GL context it will just kill your app)
   160 under iOS, if the OS can not restore your GL context it will just kill your app)