You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug report was migrated from our old Bugzilla tracker.
Reported in version: HG 2.0 Reported for operating system, platform: All, All
Comments on the original bug report:
On 2009-06-26 22:25:30 +0000, Ken Bull wrote:
SDL_GetMouseState in 1.2 looks like this:
Uint8 SDL_GetMouseState (int* x, int* y);
SDL_GetMouseState in 1.3 looks like this:
Uint8 SDL_GetMouseState (int index, int* x, int* y);
SDL_GetMouseState in 1.3 should look like this:
Uint8 SDL_GetMouseState (int* x, int* y);
and work like this:
SDL_SelectMouse (index);
button = SDL_GetMouseState (&x, &y);
On 2009-06-28 20:57:21 +0000, Ryan C. Gordon wrote:
I'm not sure we should do a "SelectMouse" API, but we probably shouldn't change the signature of functions that were in 1.2...perhaps a different function name for the new version, and SDL_GetMouseState() will be equivalent to SDL_NewVersionOfGetMouseState(0,x,y), or something.
This is the approach I took in adding multiple audio devices to 1.3 ... the 1.2 functions, which can't address a specific piece of hardware, assume the most reasonable default device.
Are there other function signatures we've changed like this? I assume this specific one was a GSoC 2008 change.
--ryan.
On 2009-06-29 13:20:09 +0000, Ken Bull wrote:
(In reply to comment # 1)
I'm not sure we should do a "SelectMouse" API, but we probably shouldn't change
the signature of functions that were in 1.2...perhaps a different function name
for the new version, and SDL_GetMouseState() will be equivalent to
SDL_NewVersionOfGetMouseState(0,x,y), or something.
There is ALREADY a SDL_SelectMouse function in SDL 1.3. The doxygen documentation for SDL_GetMouseState in 1.3 even says that it uses the "currently selected mouse". It just doesn't. Same thing for SDL_GetRelativeMouseState, SDL_SetRelativeMouseMode, SDL_GetRelativeMouseMod and SDL_GetMouseFocusWindow.
SDL_WarpMouseInWindow, SDL_CreateCursor, SDL_SetCursor, SDL_GetCursor and SDL_ShowCursor are currently the only functions that could ask for an index but don't (though multiple cursors aren't really supported yet, each of these refers to SDL_current_mouse in the code), but they also refer to the "currently selected mouse" in the documentation.
I'd personally recommend SDL_GetMouseState use the device selected with SDL_SelectMouse and have a SDL_GetMouseStateEx (or similar) which takes a mouse index, and do the same for other similar functions.
On 2009-06-29 14:11:28 +0000, Ryan C. Gordon wrote:
There is ALREADY a SDL_SelectMouse function in SDL 1.3.
Ugh, that should be removed. I'm grabbing this bug, so I can look into this further.
--ryan.
On 2009-12-14 23:03:46 +0000, Sam Lantinga wrote:
Ryan, this needs to be fixed ASAP however we do it, because currently the iPhone demos don't compile.
On 2009-12-15 22:39:08 +0000, Ryan C. Gordon wrote:
Priority bump.
--ryan.
On 2009-12-16 11:51:01 +0000, Ryan C. Gordon wrote:
I cleaned this up. SDL_GetMouseState() is now as it was in 1.2. The SelectMouse stuff is still there, but this is a mess I have to sort through.
But this should get the iPhone demos, and other existing code, up and running again.
This is svn revision # 5420.
--ryan.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
Reported in version: HG 2.0
Reported for operating system, platform: All, All
Comments on the original bug report:
On 2009-06-26 22:25:30 +0000, Ken Bull wrote:
On 2009-06-28 20:57:21 +0000, Ryan C. Gordon wrote:
On 2009-06-29 13:20:09 +0000, Ken Bull wrote:
On 2009-06-29 14:11:28 +0000, Ryan C. Gordon wrote:
On 2009-12-14 23:03:46 +0000, Sam Lantinga wrote:
On 2009-12-15 22:39:08 +0000, Ryan C. Gordon wrote:
On 2009-12-16 11:51:01 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: