src/events/SDL_mouse.c
changeset 8815 c6d0a457f3b2
parent 8783 400f1d2b9e52
child 8953 dc80dc0bd22e
     1.1 --- a/src/events/SDL_mouse.c	Wed Jun 04 10:52:34 2014 -0700
     1.2 +++ b/src/events/SDL_mouse.c	Wed Jun 04 10:55:26 2014 -0700
     1.3 @@ -482,10 +482,10 @@
     1.4  {
     1.5      SDL_Mouse *mouse = SDL_GetMouse();
     1.6  
     1.7 -    if ( window == NULL )
     1.8 +    if (window == NULL)
     1.9          window = mouse->focus;
    1.10  
    1.11 -    if ( window == NULL )
    1.12 +    if (window == NULL)
    1.13          return;
    1.14  
    1.15      if (mouse->WarpMouse) {
    1.16 @@ -495,6 +495,16 @@
    1.17      }
    1.18  }
    1.19  
    1.20 +void
    1.21 +SDL_WarpMouseGlobal(int x, int y)
    1.22 +{
    1.23 +    SDL_Mouse *mouse = SDL_GetMouse();
    1.24 +
    1.25 +    if (mouse->WarpMouseGlobal) {
    1.26 +        mouse->WarpMouseGlobal(x, y);
    1.27 +    }
    1.28 +}
    1.29 +
    1.30  static SDL_bool
    1.31  ShouldUseRelativeModeWarp(SDL_Mouse *mouse)
    1.32  {