Jump to content
  • Advertisement


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


Bad key repeat in SDL

This topic is 5749 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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!