Nobody will EVER use more than 8 buttons. Oh wait... Nobody will EVER use more than 32 buttons...
authorSam Lantinga <slouken@libsdl.org>
Mon, 12 Nov 2012 12:14:44 -0800
changeset 667378f18a929123
parent 6672 b61791cd595a
child 6674 45a21e50ba5e
Nobody will EVER use more than 8 buttons. Oh wait... Nobody will EVER use more than 32 buttons...
include/SDL_mouse.h
src/events/SDL_mouse.c
src/events/SDL_mouse_c.h
     1.1 --- a/include/SDL_mouse.h	Sat Nov 10 10:37:38 2012 -0800
     1.2 +++ b/include/SDL_mouse.h	Mon Nov 12 12:14:44 2012 -0800
     1.3 @@ -74,7 +74,7 @@
     1.4   *  mouse cursor position relative to the focus window for the currently
     1.5   *  selected mouse.  You can pass NULL for either x or y.
     1.6   */
     1.7 -extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
     1.8 +extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
     1.9  
    1.10  /**
    1.11   *  \brief Retrieve the relative state of the mouse.
    1.12 @@ -83,7 +83,7 @@
    1.13   *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the
    1.14   *  mouse deltas since the last call to SDL_GetRelativeMouseState().
    1.15   */
    1.16 -extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
    1.17 +extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
    1.18  
    1.19  /**
    1.20   *  \brief Moves the mouse to the given position within the window.
     2.1 --- a/src/events/SDL_mouse.c	Sat Nov 10 10:37:38 2012 -0800
     2.2 +++ b/src/events/SDL_mouse.c	Mon Nov 12 12:14:44 2012 -0800
     2.3 @@ -118,7 +118,7 @@
     2.4  
     2.5  /* Check to see if we need to synthesize focus events */
     2.6  static SDL_bool
     2.7 -SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint8 buttonstate)
     2.8 +SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint32 buttonstate)
     2.9  {
    2.10      SDL_Mouse *mouse = SDL_GetMouse();
    2.11      int w, h;
    2.12 @@ -264,7 +264,7 @@
    2.13      SDL_Mouse *mouse = SDL_GetMouse();
    2.14      int posted;
    2.15      Uint32 type;
    2.16 -    Uint8 buttonstate = mouse->buttonstate;
    2.17 +    Uint32 buttonstate = mouse->buttonstate;
    2.18  
    2.19      /* Figure out which event to perform */
    2.20      switch (state) {
    2.21 @@ -345,7 +345,7 @@
    2.22  {
    2.23  }
    2.24  
    2.25 -Uint8
    2.26 +Uint32
    2.27  SDL_GetMouseState(int *x, int *y)
    2.28  {
    2.29      SDL_Mouse *mouse = SDL_GetMouse();
    2.30 @@ -359,7 +359,7 @@
    2.31      return mouse->buttonstate;
    2.32  }
    2.33  
    2.34 -Uint8
    2.35 +Uint32
    2.36  SDL_GetRelativeMouseState(int *x, int *y)
    2.37  {
    2.38      SDL_Mouse *mouse = SDL_GetMouse();
     3.1 --- a/src/events/SDL_mouse_c.h	Sat Nov 10 10:37:38 2012 -0800
     3.2 +++ b/src/events/SDL_mouse_c.h	Mon Nov 12 12:14:44 2012 -0800
     3.3 @@ -58,7 +58,7 @@
     3.4      int xdelta;
     3.5      int ydelta;
     3.6      int last_x, last_y;         /* the last reported x and y coordinates */
     3.7 -    Uint8 buttonstate;
     3.8 +    Uint32 buttonstate;
     3.9      SDL_bool relative_mode;
    3.10      /* the x and y coordinates when relative mode was activated */
    3.11      int original_x, original_y;