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
This commit is contained in:
parent
ca0eb1c533
commit
013a718a1f
1 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue