src/video/SDL_video.c
changeset 7941 7c249ca44069
parent 7865 f2a42ca4ddf0
child 7950 85dc78d922db
     1.1 --- a/src/video/SDL_video.c	Sun Nov 10 11:51:06 2013 -0800
     1.2 +++ b/src/video/SDL_video.c	Sun Nov 10 14:10:00 2013 -0800
     1.3 @@ -621,9 +621,9 @@
     1.4  void *
     1.5  SDL_GetDisplayDriverData( int displayIndex )
     1.6  {
     1.7 -	CHECK_DISPLAY_INDEX( displayIndex, NULL );
     1.8 -
     1.9 -	return _this->displays[displayIndex].driverdata;
    1.10 +    CHECK_DISPLAY_INDEX( displayIndex, NULL );
    1.11 +
    1.12 +    return _this->displays[displayIndex].driverdata;
    1.13  }
    1.14  
    1.15  const char *
    1.16 @@ -1627,8 +1627,29 @@
    1.17          return;
    1.18      }
    1.19  
    1.20 +    /* Make sure we don't exceed any window size limits */
    1.21 +    if (window->min_w && w < window->min_w)
    1.22 +    {
    1.23 +        w = window->min_w;
    1.24 +    }
    1.25 +    if (window->max_w && w > window->max_w)
    1.26 +    {
    1.27 +        w = window->max_w;
    1.28 +    }
    1.29 +    if (window->min_h && h < window->min_h)
    1.30 +    {
    1.31 +        h = window->min_h;
    1.32 +    }
    1.33 +    if (window->max_h && h > window->max_h)
    1.34 +    {
    1.35 +        h = window->max_h;
    1.36 +    }
    1.37 +
    1.38      /* FIXME: Should this change fullscreen modes? */
    1.39 -    if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
    1.40 +    if (window->flags & SDL_WINDOW_FULLSCREEN) {
    1.41 +        window->windowed.w = w;
    1.42 +        window->windowed.h = h;
    1.43 +    } else {
    1.44          window->w = w;
    1.45          window->h = h;
    1.46          if (_this->SetWindowSize) {