Fixed test suite for mouse using Uint8 instead of Uint32 for buttons.

SDL_GetMouseState() returned Uint8 in SDL 1.2 but was changed recently.
This commit is contained in:
Philipp Wiesemann 2013-05-06 23:02:37 +02:00
parent 1139caac7f
commit a5a75e0bde

View file

@ -13,7 +13,7 @@
/* Test case functions */ /* Test case functions */
/* Helper to evaluate state returned from SDL_GetMouseState */ /* Helper to evaluate state returned from SDL_GetMouseState */
int _mouseStateCheck(Uint8 state) int _mouseStateCheck(Uint32 state)
{ {
return (state == 0) || return (state == 0) ||
(state == SDL_BUTTON(SDL_BUTTON_LEFT)) || (state == SDL_BUTTON(SDL_BUTTON_LEFT)) ||
@ -32,7 +32,7 @@ mouse_getMouseState(void *arg)
{ {
int x; int x;
int y; int y;
Uint8 state; Uint32 state;
/* Pump some events to update mouse state */ /* Pump some events to update mouse state */
SDL_PumpEvents(); SDL_PumpEvents();
@ -78,7 +78,7 @@ mouse_getRelativeMouseState(void *arg)
{ {
int x; int x;
int y; int y;
Uint8 state; Uint32 state;
/* Pump some events to update mouse state */ /* Pump some events to update mouse state */
SDL_PumpEvents(); SDL_PumpEvents();