SDL 1.3 Win32 Bugs

Now I’m checking windows for the same problems I have on the OS X
version. INPUT_GRABBED window style works for the windows version. If
this isn’t supported on OS X, that’s fine. It’s something I was just
experimenting with, but if not supported, Create Window should probably
return NULL on OS X if this flag is there (and report a good error.)

SDL_SetRelativeMouseMode is also broken in windows. It returns no error
and SDL_GetRelativeMouseMode returns TRUE as if it’s on. I could fix
this myself by calling WarpMouse after every mouse motion event, but
this in itself returns an mouse event (so the docs say) so that fix is out.

SDL_SetRelativeMouseMode being broken is the biggest deal I have right
now. It breaks my application in such a way that it’s hard for me to
test further.

[>] Brian

Brian Barnes wrote:

SDL_SetRelativeMouseMode is also broken in windows. It returns no error
and SDL_GetRelativeMouseMode returns TRUE as if it’s on. I could fix
this myself by calling WarpMouse after every mouse motion event, but
this in itself returns an mouse event (so the docs say) so that fix is out.

Something I’ve done in this type of situation is just call SDL_FlushEvents() passing the specific mask to get rid of the unwanted event.

-Vern

Vern Jensen wrote:

Brian Barnes wrote:

SDL_SetRelativeMouseMode is also broken in windows. It returns no error
and SDL_GetRelativeMouseMode returns TRUE as if it’s on. I could fix
this myself by calling WarpMouse after every mouse motion event, but
this in itself returns an mouse event (so the docs say) so that fix is out.

Something I’ve done in this type of situation is just call SDL_FlushEvents() passing the specific mask to get rid of the unwanted event.

You can’t even call WarpMouse, that doesn’t actually seem to work itself. This definitely needs to be fixed, it is completely broken. I’ve given a bit of code and/or suggestions to fix, hopefully somebody can get to that. Relative mouse movement needs to work in the core, it’s just too complex otherwise (and obviously 1.2 gets it right). If my way is taken (which might not be the best, I’m no expert on this code) it’ll also give the path to fix warpmouse.

The basic gist was to implement warpmouse in the glue code, then the mouse movement code can reset the mouse to center to fix. It has to deal with the extra events at that level, which keeps the code in the cross platform areas.

[>] Brian