From f9268ec8761992c8272475bd65ace757cbf5dba3 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <icculus@icculus.org>
Date: Sun, 21 Aug 2011 12:24:27 -0400
Subject: [PATCH] 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 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c
index db8be74e..419e0f1f 100644
--- a/src/video/windows/SDL_windowsopengl.c
+++ b/src/video/windows/SDL_windowsopengl.c
@@ -466,9 +466,11 @@ WIN_GL_SetupWindow(_THIS, SDL_Window * window)
         *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;
 
-- 
2.18.1