[SDL] SDL event behavior

Chris Thielen chris at luethy.net
Mon Jan 13 20:27:01 PST 2003


I was wondering if this is normal behavior, and how should I get around
it?

First, I have key repeating enabled. In my input code, I poll the input,
check for SDL_KEYDOWN, and if a key is down, I check to see if it's
SDLK_LEFT, if so, I rotate this ship on the screen.

This works great. HOWEVER, if I hold left, it starts rotating left, then
press right, while still holding left, it begins to rotate right. This
is all fine, however, when I lift up from the right key, while still
pressing the left key, it does not continue rotating left as it should.
I have to completely lift my finger off left and press it again to get
left rotations again.

This is not the behavior I want. Is this a bug in SDL? Shouldn't it
continue to say the left key is pressed when while I'm still holding it?
-- 
Chris Thielen <chris at luethy.net>





More information about the SDL mailing list