diff src/video/win32/SDL_win32opengl.c @ 3571:19691cebb866

Default to allow either accelerated or not
author Sam Lantinga <slouken@libsdl.org>
date Tue, 15 Dec 2009 20:53:09 +0000
parents 7812d3e9564e
children f7b03b6838cb
line wrap: on
line diff
--- a/src/video/win32/SDL_win32opengl.c	Tue Dec 15 20:36:31 2009 +0000
+++ b/src/video/win32/SDL_win32opengl.c	Tue Dec 15 20:53:09 2009 +0000
@@ -469,9 +469,12 @@
         *iAttr++ = _this->gl_config.multisamplesamples;
     }
 
-    *iAttr++ = WGL_ACCELERATION_ARB;
-    *iAttr++ = (_this->gl_config.accelerated ? WGL_GENERIC_ACCELERATION_ARB :
-                                               WGL_NO_ACCELERATION_ARB);
+    if (_this->gl_config.accelerated >= 0) {
+        *iAttr++ = WGL_ACCELERATION_ARB;
+        *iAttr++ =
+            (_this->gl_config.accelerated ? WGL_GENERIC_ACCELERATION_ARB :
+             WGL_NO_ACCELERATION_ARB);
+    }
 
     *iAttr = 0;