Commit 013a718a authored by Sam Lantinga's avatar Sam Lantinga

Restore the video mode after shutting down the renderer, which fixes an error...

Restore the video mode after shutting down the renderer, which fixes an error deleting the OpenGL context on Mac OS X.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404259
parent ca0eb1c5
......@@ -1493,9 +1493,6 @@ SDL_DestroyWindow(SDL_WindowID windowID)
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_DestroyWindow(SDL_WindowID windowID)
SDL_DestroyRenderer(window->id);
window->renderer = NULL;
}
/* Restore video mode, etc. */
SDL_UpdateFullscreenMode(window, SDL_FALSE);
if (_this->DestroyWindow) {
_this->DestroyWindow(_this, window);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment