Restore the video mode after shutting down the renderer, which fixes an error deleting the OpenGL context on Mac OS X.
--- a/src/video/SDL_video.c Thu Dec 03 04:33:05 2009 +0000
+++ b/src/video/SDL_video.c Thu Dec 03 05:05:26 2009 +0000
@@ -1493,9 +1493,6 @@
return;
}
- /* Restore video mode, etc. */
- SDL_SetWindowFullscreen(windowID, 0);
-
for (i = 0; i < _this->num_displays; ++i) {
SDL_VideoDisplay *display = &_this->displays[i];
for (j = 0; j < display->num_windows; ++j) {
@@ -1511,6 +1508,10 @@
SDL_DestroyRenderer(window->id);
window->renderer = NULL;
}
+
+ /* Restore video mode, etc. */
+ SDL_UpdateFullscreenMode(window, SDL_FALSE);
+
if (_this->DestroyWindow) {
_this->DestroyWindow(_this, window);
}