Sign in to follow this  
DvDmanDT

Is there a sane way to identify axes in DirectInput?

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

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