Jump to content
  • Advertisement


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


Direct Input?!

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

How would you detect a key is down, and only take action for that down once? (once action per keypress) since DirectInput just return the state of the key. I tried if ((m_kKeyboard.IsButtonDown (DIK_SPACE))&&(m_fSpace==FALSE)) { DO SOMETHING; } to check if the key is down and take action here(where m_fSpace is just a flag), then if (m_kKeyboard.IsButtonUp (DIK_SPACE)) m_fSpace=FALSE; to reset the flag But when it come to running, I add a breakpoint to DO SOMETHING, my application break as soon as I start it. What is my problem? The funny (and flustraiting ) thing is I did quite a lots loop in my program when I remove some It run OK again! Anyone has any idea pls help! Thx [edited by - kanguru on August 14, 2002 4:53:32 AM]

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!