src/video/SDL_video.c
changeset 5403 424f036f7c68
parent 5398 83816c8a2b58
child 5404 6717e01acbe0
     1.1 --- a/src/video/SDL_video.c	Sat Feb 26 21:39:34 2011 -0800
     1.2 +++ b/src/video/SDL_video.c	Sun Feb 27 20:06:45 2011 -0800
     1.3 @@ -108,9 +108,6 @@
     1.4          return retval; \
     1.5      }
     1.6  
     1.7 -/* Various local functions */
     1.8 -static void SDL_UpdateWindowGrab(SDL_Window * window);
     1.9 -
    1.10  /* Support for framebuffer emulation using an accelerated renderer */
    1.11  
    1.12  #define SDL_WINDOWTEXTUREDATA   "_SDL_WindowTextureData"
    1.13 @@ -1672,22 +1669,6 @@
    1.14      return _this->UpdateWindowFramebuffer(_this, window, rects, numrects);
    1.15  }
    1.16  
    1.17 -void
    1.18 -SDL_SetWindowGrab(SDL_Window * window, int mode)
    1.19 -{
    1.20 -    CHECK_WINDOW_MAGIC(window, );
    1.21 -
    1.22 -    if ((!!mode == !!(window->flags & SDL_WINDOW_INPUT_GRABBED))) {
    1.23 -        return;
    1.24 -    }
    1.25 -    if (mode) {
    1.26 -        window->flags |= SDL_WINDOW_INPUT_GRABBED;
    1.27 -    } else {
    1.28 -        window->flags &= ~SDL_WINDOW_INPUT_GRABBED;
    1.29 -    }
    1.30 -    SDL_UpdateWindowGrab(window);
    1.31 -}
    1.32 -
    1.33  static void
    1.34  SDL_UpdateWindowGrab(SDL_Window * window)
    1.35  {
    1.36 @@ -1696,7 +1677,23 @@
    1.37      }
    1.38  }
    1.39  
    1.40 -int
    1.41 +void
    1.42 +SDL_SetWindowGrab(SDL_Window * window, SDL_bool grabbed)
    1.43 +{
    1.44 +    CHECK_WINDOW_MAGIC(window, );
    1.45 +
    1.46 +    if ((!!grabbed == !!(window->flags & SDL_WINDOW_INPUT_GRABBED))) {
    1.47 +        return;
    1.48 +    }
    1.49 +    if (grabbed) {
    1.50 +        window->flags |= SDL_WINDOW_INPUT_GRABBED;
    1.51 +    } else {
    1.52 +        window->flags &= ~SDL_WINDOW_INPUT_GRABBED;
    1.53 +    }
    1.54 +    SDL_UpdateWindowGrab(window);
    1.55 +}
    1.56 +
    1.57 +SDL_bool
    1.58  SDL_GetWindowGrab(SDL_Window * window)
    1.59  {
    1.60      CHECK_WINDOW_MAGIC(window, 0);