Restore the video mode after shutting down the renderer, which fixes an error deleting the OpenGL context on Mac OS X.
authorSam Lantinga <slouken@libsdl.org>
Thu, 03 Dec 2009 05:05:26 +0000
changeset 351672e70a8c30d5
parent 3515 d94e331e85fa
child 3517 e7eec78e4b92
Restore the video mode after shutting down the renderer, which fixes an error deleting the OpenGL context on Mac OS X.
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Thu Dec 03 04:33:05 2009 +0000
     1.2 +++ b/src/video/SDL_video.c	Thu Dec 03 05:05:26 2009 +0000
     1.3 @@ -1493,9 +1493,6 @@
     1.4          return;
     1.5      }
     1.6  
     1.7 -    /* Restore video mode, etc. */
     1.8 -    SDL_SetWindowFullscreen(windowID, 0);
     1.9 -
    1.10      for (i = 0; i < _this->num_displays; ++i) {
    1.11          SDL_VideoDisplay *display = &_this->displays[i];
    1.12          for (j = 0; j < display->num_windows; ++j) {
    1.13 @@ -1511,6 +1508,10 @@
    1.14                  SDL_DestroyRenderer(window->id);
    1.15                  window->renderer = NULL;
    1.16              }
    1.17 +
    1.18 +            /* Restore video mode, etc. */
    1.19 +            SDL_UpdateFullscreenMode(window, SDL_FALSE);
    1.20 +
    1.21              if (_this->DestroyWindow) {
    1.22                  _this->DestroyWindow(_this, window);
    1.23              }