Skip to main content
gamedev.net
🔒 Locked

[simple dinput question]

Started by aDasTRa 1 reply 300+ views
Original Post
aDasTRa
aDasTRa
i want to write a simple function like: bool checkKey ( key ) which will return true/false if the key is pressed. i know how to set up everything and i know how to check it; thats not my problem. i just wanted to know what datatype is the DIK_[whatever]in, so i can pass the identifier as a parameter, like checkKey ( DIK_ESCAPE ). I checked the dinput.h file but it was in a hex format...which doesnt do me much good. does anybody know? help... <(o)>
<(o)>
NightShade
NightShade
I think DirectInput techincally considers it a DWORD value (which in turn is defined as an unsigned long int I think), as that is what the DIDEVICEOBJECTDATA.dwOfs value is, and that is where buffered key values get returned.

Personally, I just use int. It works fine.






-ns-
-ns-
aDasTRa
aDasTRa
thanks, ill try it

<(o)>
<(o)>

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.