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 6673 78f18a929123
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
--- a/include/SDL_mouse.h	Sat Nov 10 10:37:38 2012 -0800
+++ b/include/SDL_mouse.h	Mon Nov 12 12:14:44 2012 -0800
@@ -74,7 +74,7 @@
  *  mouse cursor position relative to the focus window for the currently
  *  selected mouse.  You can pass NULL for either x or y.
  */
-extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
+extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
 
 /**
  *  \brief Retrieve the relative state of the mouse.
@@ -83,7 +83,7 @@
  *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the
  *  mouse deltas since the last call to SDL_GetRelativeMouseState().
  */
-extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
+extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
 
 /**
  *  \brief Moves the mouse to the given position within the window.
--- a/src/events/SDL_mouse.c	Sat Nov 10 10:37:38 2012 -0800
+++ b/src/events/SDL_mouse.c	Mon Nov 12 12:14:44 2012 -0800
@@ -118,7 +118,7 @@
 
 /* Check to see if we need to synthesize focus events */
 static SDL_bool
-SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint8 buttonstate)
+SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint32 buttonstate)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
     int w, h;
@@ -264,7 +264,7 @@
     SDL_Mouse *mouse = SDL_GetMouse();
     int posted;
     Uint32 type;
-    Uint8 buttonstate = mouse->buttonstate;
+    Uint32 buttonstate = mouse->buttonstate;
 
     /* Figure out which event to perform */
     switch (state) {
@@ -345,7 +345,7 @@
 {
 }
 
-Uint8
+Uint32
 SDL_GetMouseState(int *x, int *y)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
@@ -359,7 +359,7 @@
     return mouse->buttonstate;
 }
 
-Uint8
+Uint32
 SDL_GetRelativeMouseState(int *x, int *y)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
--- a/src/events/SDL_mouse_c.h	Sat Nov 10 10:37:38 2012 -0800
+++ b/src/events/SDL_mouse_c.h	Mon Nov 12 12:14:44 2012 -0800
@@ -58,7 +58,7 @@
     int xdelta;
     int ydelta;
     int last_x, last_y;         /* the last reported x and y coordinates */
-    Uint8 buttonstate;
+    Uint32 buttonstate;
     SDL_bool relative_mode;
     /* the x and y coordinates when relative mode was activated */
     int original_x, original_y;