According to the docs (README-android in the SDL source/docs):
“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
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
In the latest version of SDL (from source), the SDL_RENDER_DEVICE_RESET
event is sent out when the context cannot be restored. However in normal
usage of a test application, I never receive this signal (I tried hiding
the backgrounding, turning off the display etc). I guess my device is new
enough to avoid scrapping the GL context often.
But I want to ensure my application can handle that event when it happens.
Is there any way I can force a context loss to actually test for that case?