• Advertisement
Sign in to follow this  

Is there a sane way to identify axes in DirectInput?

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

  • Advertisement