Jump to content
  • Advertisement
Sign in to follow this  

Is there a sane way to identify axes in DirectInput?

This topic is 4095 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

Hello, is there any sane way to identify an axis by the Offset/dwOfs property of buffered data? The dwOfs or Offset as it's called in MDX, is indeed an identifier, but I can't seem to find any real logic in which offset belongs to which axis. The X-axis has Offset == 0, while Y has Offset == 4 and Z == 8. The reason I'm asking is because I'd like to keep track of their current states using an int or long array. If an object has 3 axes, I'd like to allocate 3 longs, but if I do that, I can't use Offset as the index, as it'll go out of bounds. So, what I'd like to do is something like order them from 0-2 somehow, and I was wondering if there's a sane way to do this, or if I'll have to keep track of all Offsets and their index for every device? Note that I'm using buffered input (for unbuffered input, there are other methods which probably work great and that are much better documented).

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!