diff src/video/cocoa/SDL_cocoaopengl.m @ 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 64ce267332c6
line wrap: on
line diff
--- a/src/video/cocoa/SDL_cocoaopengl.m	Tue Dec 15 20:36:31 2009 +0000
+++ b/src/video/cocoa/SDL_cocoaopengl.m	Tue Dec 15 20:53:09 2009 +0000
@@ -133,11 +133,13 @@
         attr[i++] = NSOpenGLPFANoRecovery;
     }
 
-    if (_this->gl_config.accelerated) {
-        attr[i++] = NSOpenGLPFAAccelerated;
-    } else {
-        attr[i++] = NSOpenGLPFARendererID;
-        attr[i++] = kCGLRendererGenericFloatID;
+    if (_this->gl_config.accelerated >= 0) {
+        if (_this->gl_config.accelerated) {
+            attr[i++] = NSOpenGLPFAAccelerated;
+        } else {
+            attr[i++] = NSOpenGLPFARendererID;
+            attr[i++] = kCGLRendererGenericFloatID;
+        }
     }
 
     attr[i++] = NSOpenGLPFAScreenMask;