Jump to content
  • Advertisement
Sign in to follow this  
gfxLearner

Joystick with Raw Input?

This topic is 4029 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 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
Advertisement
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
Sign in to follow this  

  • 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!