Sign in to follow this  
gfxLearner

Joystick with Raw Input?

Recommended Posts

gfxLearner    122
I am using Raw Input API in my application to get input data. As far as keyboard and mouse are concerned, it works fine. But having problems with joystick. First is, i get continuous input events for joystick in my raw input message handler function when the device is attached and even if i dont press any button, it continuous to receive messages as if the device is being used. This is not the case with keyboard and mouse. Second is, how do i use the information received from the joystick. There is RAWMOUSE that gives mouse information, RAWKEYBOARD for keys pressed. But RAWHID has typedef struct tagRAWHID { DWORD dwSizeHid; // byte size of each report DWORD dwCount; // number of input packed BYTE bRawData[1]; } RAWHID, *PRAWHID, *LPRAWHID; this format. How do i use the BYTE array to determine which joystick function is used? Thanks for any help.

Share this post


Link to post
Share on other sites
Extrarius    1412
Is there any particular reason you need to use raw input instead of the APIs designed specifically for dealing with such devices?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this