add the preserve context directive.

It will not prevent contextLost but improve situation on many devices.
This commit is contained in:
David "Blackmagic" Elahee
2014-07-09 10:07:45 +02:00
parent b32cbd15fa
commit fe5a62c20a

View File

@@ -205,6 +205,9 @@ class MainView extends GLSurfaceView {
setRenderer (new Renderer (this));
setRenderMode (GLSurfaceView.RENDERMODE_WHEN_DIRTY);
::if (ANDROID_TARGET_SDK_VERSION > 11)::
setPreserveEGLContextOnPause(true);
::end::
}