This topic is now archived and is closed to further replies.

Bad key repeat in SDL

This topic is 5532 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am having some trouble with the sdl key repeat. I have a sphere on the screen that I want to move between a few positions. When I press up the sphere moves through all the positions until I release the key and I can''t press the key quick enough to get it to move only one position. I have tried enabling the sdl key repeat, but it only seems to work for one key press. Here is the repeat activation: if( SDL_EnableKeyRepeat(100,SDL_DEFAULT_REPEAT_DELAY) ) { cerr << "Failed enabling key repeat" << endl; Exit(1); } I have tried using larger than 100 and INTERVAL instead of delay but it always only works once. Is there an easy way to fix this?

Share this post

Link to post
Share on other sites