# HG changeset patch # User Sam Lantinga # Date 1259816726 0 # Node ID 72e70a8c30d5fd14baf5364947ba3559ba7faca4 # Parent d94e331e85fa8a3e91051f7955f736003a9bd1b9 Restore the video mode after shutting down the renderer, which fixes an error deleting the OpenGL context on Mac OS X. diff -r d94e331e85fa -r 72e70a8c30d5 src/video/SDL_video.c --- 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); }