Compartir a través de


Joystick Device Constants

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 are 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.

Constant Device object
DIJOFS_BUTTON0 to DIJOFS_BUTTON31 or DIJOFS_BUTTON(n) Button
DIJOFS_POV(n) Point-of-view indicator
DIJOFS_RX X-axis rotation
DIJOFS_RY Y-axis rotation
DIJOFS_RZ Z-axis rotation (rudder)
DIJOFS_X X-axis
DIJOFS_Y Y-axis
DIJOFS_Z Z-axis
DIJOFS_SLIDER(n) Slider axis