SDL_WarpMouse & unicode Oddities

Hello,

Yes it’s me again :slight_smile:

With SDL 1.2.5 under X11 SDL_WarpMouse will happily warp the mouse
outside the window if asked. It also seems to interpret the x and
y co-ordinates as signed even though the C proto-type uses Uint16’s.

This isn’t really a problem for me (I suppose it might even be
useful sometimes). Just wondering if that’s what’s supposed to
happen.

Also, the SDL docs seem to indicate that unicode doesn’t work
for key up events, but I do seem to be getting valid (ascii)
codes when a key is released.

(I’m afraid I’m such a newbie with SDL I don’t really know if some
of the odd things I’ve found are bugs or deliberate design features
I can rely on if I want to.)

Thanks–
Adrian Hey

I had a similar problem - the solution given to me was to do the warp mouse
in the same thread that was receiving the events - this significantly
reduced the time that the warp took…> ----- Original Message -----

From: ahey@eptools.demon.co.uk (Adrian Hey)
To:
Sent: Thursday, May 01, 2003 12:45 AM
Subject: [SDL] SDL_WarpMouse & unicode Oddities

Hello,

Yes it’s me again :slight_smile:

With SDL 1.2.5 under X11 SDL_WarpMouse will happily warp the mouse
outside the window if asked. It also seems to interpret the x and
y co-ordinates as signed even though the C proto-type uses Uint16’s.

This isn’t really a problem for me (I suppose it might even be
useful sometimes). Just wondering if that’s what’s supposed to
happen.

Also, the SDL docs seem to indicate that unicode doesn’t work
for key up events, but I do seem to be getting valid (ascii)
codes when a key is released.

(I’m afraid I’m such a newbie with SDL I don’t really know if some
of the odd things I’ve found are bugs or deliberate design features
I can rely on if I want to.)

Thanks

Adrian Hey


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hello,

Yes it’s me again :slight_smile:

:slight_smile:

With SDL 1.2.5 under X11 SDL_WarpMouse will happily warp the mouse
outside the window if asked. It also seems to interpret the x and
y co-ordinates as signed even though the C proto-type uses Uint16’s.

It’s not supposed to. It’s more of a buglet than a feature.

Also, the SDL docs seem to indicate that unicode doesn’t work
for key up events, but I do seem to be getting valid (ascii)
codes when a key is released.

SDL keysyms are chosen so they map to ASCII, but the unicode field isn’t
valid on key up, which means you won’t get any shift modifiers and it
won’t give you anything meaningful for international keyboards.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment