|
@@ -175,18 +175,20 @@ public class ZenGL extends GLSurfaceView
|
|
|
((Activity)getContext()).finish();
|
|
|
System.exit( 0 );
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public void SwapBuffers()
|
|
|
{
|
|
|
- EGL10 currEGL = (EGL10)EGLContext.getEGL();
|
|
|
+ try {
|
|
|
+ EGL10 currEGL = (EGL10)EGLContext.getEGL();
|
|
|
|
|
|
- EGLDisplay currDisplay = currEGL.eglGetCurrentDisplay();
|
|
|
- if ( currDisplay == EGL10.EGL_NO_DISPLAY ) return;
|
|
|
+ EGLDisplay currDisplay = currEGL.eglGetCurrentDisplay();
|
|
|
+ if ( currDisplay == EGL10.EGL_NO_DISPLAY ) return;
|
|
|
|
|
|
- EGLSurface currSurface = currEGL.eglGetCurrentSurface( EGL10.EGL_DRAW );
|
|
|
- if ( currSurface == EGL10.EGL_NO_SURFACE ) return;
|
|
|
+ EGLSurface currSurface = currEGL.eglGetCurrentSurface( EGL10.EGL_DRAW );
|
|
|
+ if ( currSurface == EGL10.EGL_NO_SURFACE ) return;
|
|
|
|
|
|
- currEGL.eglSwapBuffers( currDisplay, currSurface);
|
|
|
+ currEGL.eglSwapBuffers( currDisplay, currSurface);
|
|
|
+ } catch ( Exception e ) { }
|
|
|
}
|
|
|
|
|
|
public void ShowKeyboard()
|
|
@@ -270,4 +272,4 @@ public class ZenGL extends GLSurfaceView
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|