Fix SDL_GL_ACCELERATED_VISUAL on Windows in the 1.3 branch.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 21 Aug 2011 12:24:27 -0400
changeset 5624 84d302e859d1
parent 5622 08e941dad8e9
child 5625 0a9b94c0613c
Fix SDL_GL_ACCELERATED_VISUAL on Windows in the 1.3 branch. Fixes Bugzilla #1254. Thanks to Thilo Schulz for the patch!
src/video/windows/SDL_windowsopengl.c
--- a/src/video/windows/SDL_windowsopengl.c	Sun Aug 21 11:52:21 2011 -0400
+++ b/src/video/windows/SDL_windowsopengl.c	Sun Aug 21 12:24:27 2011 -0400
@@ -466,9 +466,11 @@
         *iAttr++ = _this->gl_config.multisamplesamples;
     }
 
-    *iAttr++ = WGL_ACCELERATION_ARB;
-    *iAttr++ = (_this->gl_config.accelerated ? WGL_FULL_ACCELERATION_ARB :
-                                               WGL_NO_ACCELERATION_ARB);
+    if ( this->gl_config.accelerated >= 0 ) {
+        *iAttr++ = WGL_ACCELERATION_ARB;
+        *iAttr++ = (_this->gl_config.accelerated ? WGL_FULL_ACCELERATION_ARB :
+                                                   WGL_NO_ACCELERATION_ARB);
+    }
 
     *iAttr = 0;