From 29049cfbaa9a05942c39f58eb12009131bccf203 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 26 May 2008 12:43:37 +0000 Subject: [PATCH] Reverted revision 3416, fixing bug #589 http://bugzilla.libsdl.org/show_bug.cgi?id=589 I was going to add the current window to the OpenGL context info, but that doesn't fix the case where you set the current context to NULL and then set the current context to the same window it had before. This also doesn't take into account changes to the window that might affect the context, such as viewport changing or fullscreen/windowed mode changing. Any ideas? --- src/video/SDL_sysvideo.h | 1 - src/video/SDL_video.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h index dd40449c7..fbc9408db 100644 --- a/src/video/SDL_sysvideo.h +++ b/src/video/SDL_sysvideo.h @@ -127,7 +127,6 @@ struct SDL_Window int display; SDL_Renderer *renderer; - SDL_GLContext context; void *userdata; void *driverdata; diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 5a52f03b7..a5354c224 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2525,12 +2525,6 @@ SDL_GL_MakeCurrent(SDL_WindowID windowID, SDL_GLContext context) if (!context) { window = NULL; } - if (window) { - if (window->context == context) { - return 0; - } - window->context = context; - } return _this->GL_MakeCurrent(_this, window, context); }