The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_GetMouseState() api changed again?
Vittorio G.
Guest

hello,
i might be wrong but i was under the impression that the SDL_GetMouseState() api was updated to (int index, int *x, int *y) so that you could identify x and y positions for multiple mice.
Recently i had a link failure because of wrong parameters, and discovered that SDL_GetMouseState() was set back to the old api, and in order to select a different mouse, you must call SDL_SelectMouse() function.

why such a change? isn't using 2 function calls for performing an operation that could have been done in one more time consuming both at documentation level and at coding level?

Vittorio
SDL_GetMouseState() api changed again?
Vittorio G.
Guest

uh i'm not sure whether my message got posted or not, so i mail it again just in case
i hope not to sound insistent or rude, but i believe having a discussion on an api change might be interesting Smile
Vittorio

On Wed, Dec 30, 2009 at 6:09 PM, Vittorio G. wrote:
Quote:
hello,
i might be wrong but i was under the impression that the SDL_GetMouseState() api was updated to (int index, int *x, int *y) so that you could identify x and y positions for multiple mice.
Recently i had a link failure because of wrong parameters, and discovered that SDL_GetMouseState() was set back to the old api, and in order to select a different mouse, you must call SDL_SelectMouse() function.

why such a change? isn't using 2 function calls for performing an operation that could have been done in one more time consuming both at documentation level and at coding level?

Vittorio



--

Charles de Gaulle  - "The better I get to know men, the more I find myself loving dogs."
Zweistein


Joined: 26 Jan 2010
Posts: 1
I figured out today why i couldn t get any mouse inputs with sdl 1.3...

The default mouse was my laptop touchpad, and not my usb mouse. I had no problem with that under 1.2. I personally would prefer a more abstract layer, so that i can have mouse input on what ever mouse is currently used. Like it works with windows mouse management right now.

Maybe you can implement something like:

SDL_SelectMouse(SDL_MOUSE_ALL);

?