From 3bc0d3bc00228d6b5b6e63e6519a86a50971a90f Mon Sep 17 00:00:00 2001 From: Sylvain Beucler Date: Thu, 15 Mar 2012 19:52:16 +0000 Subject: [PATCH] Error handling for eglSwapBuffers git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1139 7f0cb862-5218-0410-a997-914c9d46530a --- src/egl/fg_display_egl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/egl/fg_display_egl.c b/src/egl/fg_display_egl.c index 260b6ab..f94d873 100644 --- a/src/egl/fg_display_egl.c +++ b/src/egl/fg_display_egl.c @@ -32,5 +32,6 @@ void fgPlatformGlutSwapBuffers( SFG_PlatformDisplay *pDisplayPtr, SFG_Window* CurrentWindow ) { /* LOGI("Swap!"); */ - eglSwapBuffers( pDisplayPtr->eglDisplay, CurrentWindow->Window.pContext.eglSurface ); + if (!eglSwapBuffers(pDisplayPtr->eglDisplay, CurrentWindow->Window.pContext.eglSurface)) + fgError("eglSwapBuffers: error %x\n", eglGetError()); } -- 1.7.10.4