Commit 8b304825 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Initial band-aids on SDL_GetMouseState() API breakage. More work to come.

 Fixes Bugzilla #758.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404334
parent 691ee6f7
...@@ -111,7 +111,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(int index); ...@@ -111,7 +111,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(int index);
* mouse cursor position relative to the focus window for the currently * mouse cursor position relative to the focus window for the currently
* selected mouse. You can pass NULL for either x or y. * selected mouse. You can pass NULL for either x or y.
*/ */
extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int index, int *x, int *y); extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
/** /**
* \brief Retrieve the state of the specified mouse. * \brief Retrieve the state of the specified mouse.
......
...@@ -285,7 +285,7 @@ SDL_CompatEventFilter(void *userdata, SDL_Event * event) ...@@ -285,7 +285,7 @@ SDL_CompatEventFilter(void *userdata, SDL_Event * event)
} }
selected = SDL_SelectMouse(event->wheel.which); selected = SDL_SelectMouse(event->wheel.which);
SDL_GetMouseState(selected, &x, &y); SDL_GetMouseState(&x, &y);
SDL_SelectMouse(selected); SDL_SelectMouse(selected);
if (event->wheel.y > 0) { if (event->wheel.y > 0) {
......
...@@ -252,9 +252,9 @@ SDL_GetRelativeMouseMode(int index) ...@@ -252,9 +252,9 @@ SDL_GetRelativeMouseMode(int index)
} }
Uint8 Uint8
SDL_GetMouseState(int index, int *x, int *y) SDL_GetMouseState(int *x, int *y)
{ {
SDL_Mouse *mouse = SDL_GetMouse(index); SDL_Mouse *mouse = SDL_GetMouse(SDL_current_mouse);
if (!mouse) { if (!mouse) {
if (x) { if (x) {
......
...@@ -291,7 +291,7 @@ MoveSprite(SDL_Surface * screen, SDL_Surface * light) ...@@ -291,7 +291,7 @@ MoveSprite(SDL_Surface * screen, SDL_Surface * light)
if (light != NULL) { if (light != NULL) {
int x, y; int x, y;
SDL_GetMouseState(0, &x, &y); SDL_GetMouseState(&x, &y);
FlashLight(screen, light, x, y); FlashLight(screen, light, x, y);
} }
......
...@@ -270,7 +270,7 @@ DrawLogoCursor(void) ...@@ -270,7 +270,7 @@ DrawLogoCursor(void)
} }
/* Move the image around */ /* Move the image around */
SDL_GetMouseState(0, &x, &y); SDL_GetMouseState(&x, &y);
x -= w / 2; x -= w / 2;
y -= h / 2; y -= h / 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment