diff src/video/SDL_video.c @ 1913:83420da906a5

Implemented Windows OpenGL support Fixed slowdown enumerating display modes, which was hosing OpenGL as well... Removed SDL_ from the render driver prefixes
author Sam Lantinga <slouken@libsdl.org>
date Mon, 17 Jul 2006 06:47:33 +0000
parents 8d384b647307
children 092bd3a019c5
line wrap: on
line diff
--- a/src/video/SDL_video.c	Sun Jul 16 09:34:01 2006 +0000
+++ b/src/video/SDL_video.c	Mon Jul 17 06:47:33 2006 +0000
@@ -2117,11 +2117,11 @@
         return -1;
     }
 
-    if (_this->GL_GetAttribute) {
-        retval = _this->GL_GetAttribute(_this, attr, value);
+    if (_this->GL_GetWindowAttribute) {
+        retval = _this->GL_GetWindowAttribute(_this, window, attr, value);
     } else {
         *value = 0;
-        SDL_SetError("GL_GetAttribute not supported");
+        SDL_SetError("GL_GetWindowAttribute not supported");
         retval = -1;
     }
     return retval;
@@ -2147,10 +2147,7 @@
 {
     SDL_Window *window = SDL_GetWindowFromID(windowID);
 
-    if (!window || !context) {
-        return -1;
-    }
-    if (!(window->flags & SDL_WINDOW_OPENGL)) {
+    if (window && !(window->flags & SDL_WINDOW_OPENGL)) {
         SDL_SetError("The specified window isn't an OpenGL window");
         return -1;
     }