src/video/SDL_video.c
changeset 10024 9a1189c7b891
parent 10021 3beca914a2ad
child 10025 bf4f8cde1c54
     1.1 --- a/src/video/SDL_video.c	Tue Jan 05 02:27:26 2016 -0500
     1.2 +++ b/src/video/SDL_video.c	Tue Jan 05 02:29:06 2016 -0500
     1.3 @@ -1907,6 +1907,28 @@
     1.4      }
     1.5  }
     1.6  
     1.7 +int
     1.8 +SDL_GetWindowBordersSize(SDL_Window * window, int *top, int *left, int *bottom, int *right)
     1.9 +{
    1.10 +    int dummy = 0;
    1.11 +
    1.12 +    if (!top) { top = &dummy; }
    1.13 +    if (!left) { left = &dummy; }
    1.14 +    if (!right) { right = &dummy; }
    1.15 +    if (!bottom) { bottom = &dummy; }
    1.16 +
    1.17 +    /* Always initialize, so applications don't have to care */
    1.18 +    *top = *left = *bottom = *right = 0;
    1.19 +
    1.20 +    CHECK_WINDOW_MAGIC(window, -1);
    1.21 +
    1.22 +    if (!_this->GetWindowBordersSize) {
    1.23 +        return SDL_Unsupported();
    1.24 +    }
    1.25 +
    1.26 +    return _this->GetWindowBordersSize(_this, window, top, left, bottom, right);
    1.27 +}
    1.28 +
    1.29  void
    1.30  SDL_GetWindowMinimumSize(SDL_Window * window, int *min_w, int *min_h)
    1.31  {