Joystick device constants represent offsets within a joystick device's data packet, the DIJOYSTATE structure. The data at a given offset is associated with a device object; that is, a button or axis. Typically, these values will be used in the dwOfs member of the DIDEVICEOBJECTDATA, DIOBJECTDATAFORMAT or DIDEVICEOBJECTINSTANCE structures.
The following macros return a constant indicating the offset of the data for a particular button or axis relative to the beginning of the DIJOYSTATE structure:
DIJOFS_BUTTON0 to DIJOFS_BUTTON31 or DIJOFS_BUTTON(n) | A button. |
DIJOFS_POV(n) | A point-of-view indicator. |
DIJOFS_RX | The x-axis rotation. |
DIJOFS_RY | The y-axis rotation. |
DIJOFS_RZ | The z-axis rotation (rudder). |
DIJOFS_X | The x-axis. |
DIJOFS_Y | The y-axis. |
DIJOFS_Z | The z-axis. |
DIJOFS_SLIDER(n) | A slider axis. |