comparison src/video/SDL_video.c @ 2702:11eb9ae3c88c

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?
author Sam Lantinga <slouken@libsdl.org>
date Mon, 26 May 2008 12:43:37 +0000
parents 91e601d9df8b
children 204be4fc2726
comparison
equal deleted inserted replaced
2701:91b0e95f443a 2702:11eb9ae3c88c
2523 return -1; 2523 return -1;
2524 } 2524 }
2525 if (!context) { 2525 if (!context) {
2526 window = NULL; 2526 window = NULL;
2527 } 2527 }
2528 if (window) {
2529 if (window->context == context) {
2530 return 0;
2531 }
2532 window->context = context;
2533 }
2534 return _this->GL_MakeCurrent(_this, window, context); 2528 return _this->GL_MakeCurrent(_this, window, context);
2535 } 2529 }
2536 2530
2537 int 2531 int
2538 SDL_GL_SetSwapInterval(int interval) 2532 SDL_GL_SetSwapInterval(int interval)