Jump to content
  • Advertisement

Archived

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

PaulSchwarz

Input

This topic is 5730 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 have a problem. I''ve written a small program using DirectInput 8. I''ve compiled it and pressed randomly some keys on the keyboard so as to check if the program was working correctly. Unfortunatelly, despite programming some OnAnyKeyPress events the program seemed not to notice that the key had been pressed when I was pressing arrow keys. But when I was pressing some other keys, everything worked smoothly. Simply, I can''t find out in which part of the program''s code I made a mistake, so I cannot provide you any more information about my problem. Yet, if you ever had something similar, post here your message, pls.

Share this post


Link to post
Share on other sites
Advertisement
Are you using buffered input? If not, this is the typical problem with Direct Input when not using buffered input. It is possible that you''re application will miss a click or a keypress while it is doing something else, say rendering.

When using buffered input, (GetDeviceData() instead of GetDeviceState()) Direct Input captures everything and holds it in a buffer waiting for you to process it. Buffered data takes a bit more setup to get working properly, but simplifies keyboard management. It makes mouse management a bit more accurate though more complex than non-buffered input.

I''d suggest getting buffered input up and running and if you still have the same problem send me an email. I''ll see if I can help you get it up and running.



Derek Licciardi (Kressilac)
Elysian Productions Inc.

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!