Applied Christian's change to drop unnecessary dependency to X11 libraries we
[freeglut] / src / egl / fg_display_egl.c
index 260b6ab..f094221 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * freeglut_display_android.c
+ * fg_display_android.c
  *
  * Display message posting, context buffer swapping.
  *
 #include <GL/freeglut.h>
 #include "fg_internal.h"
 
-#include <android/log.h>
-#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "FreeGLUT", __VA_ARGS__))
-
 void fgPlatformGlutSwapBuffers( SFG_PlatformDisplay *pDisplayPtr, SFG_Window* CurrentWindow )
 {
-  /* LOGI("Swap!"); */
-  eglSwapBuffers( pDisplayPtr->eglDisplay, CurrentWindow->Window.pContext.eglSurface );
+  if (!eglSwapBuffers(pDisplayPtr->egl.Display, CurrentWindow->Window.pContext.egl.Surface))
+    fgError("eglSwapBuffers: error %x\n", eglGetError());
 }