diff src/video/x11/SDL_x11opengl.c @ 2324:3202e4826c57

more valgrind errors fixed. Plus I ran make indent which changed a few files.
author Bob Pendleton <bob@pendleton.com>
date Fri, 07 Mar 2008 17:20:37 +0000
parents 4ac07ae446d3
children 7b53a8401195
line wrap: on
line diff
--- a/src/video/x11/SDL_x11opengl.c	Thu Mar 06 23:07:02 2008 +0000
+++ b/src/video/x11/SDL_x11opengl.c	Fri Mar 07 17:20:37 2008 +0000
@@ -281,19 +281,19 @@
 X11_GL_Initialize(_THIS)
 {
 
-  if (X11_GL_InitializeMemory(_this) < 0) {
-     return -1;
-  }
-  ++_this->gl_data->initialized;
+    if (X11_GL_InitializeMemory(_this) < 0) {
+        return -1;
+    }
+    ++_this->gl_data->initialized;
 
-  if (X11_GL_LoadLibrary(_this, NULL) < 0) {
-    return -1;
-  }
+    if (X11_GL_LoadLibrary(_this, NULL) < 0) {
+        return -1;
+    }
 
-  /* Initialize extensions */
-  X11_GL_InitExtensions(_this);
+    /* Initialize extensions */
+    X11_GL_InitExtensions(_this);
 
-  return 0;
+    return 0;
 }
 
 void
@@ -523,6 +523,7 @@
     GLXContext glx_context = (GLXContext) context;
 
     _this->gl_data->glXDestroyContext(display, glx_context);
+    XSync(display, False);
 }
 
 #endif /* SDL_VIDEO_OPENGL_GLX */