Advertisement

DInput8

Started by June 05, 2002 01:28 AM
2 comments, last by edwinnie 22 years, 6 months ago
okie, i managed to have DInput8 usage for my tetris clonie. But i noticed that, for keyboard inputs, only one keyboard action takes place after the key is "pressed and held down". How could i have the action to repeat w/o problems of an infinite loop, that is, if i hold down the key, the keyboard input will keep processing, until i lift up the key?
hiya, doesn''t the GetDeviceState(...) does this? it even does it very fast..,

http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
Advertisement
Try a table of keys that store the up/down state of the keys. When you get a down message, set it to true. When you get an up message set it to false.

Then, in your game, look at the table instead of keying directly off DInput.

Make sense?

How to handle delays and repeat rates is an additional matter.

[edited by - Waverider on June 5, 2002 11:44:30 AM]
It's not what you're taught, it's what you learn.
firstly, i dun understand what u mean.

previously, i know how to stop repeated movements, and limiting them to being executed once, but what i am trying to do now
is the reverse.

This topic is closed to new replies.

Advertisement