INFO: DirectInput Inf Defintions for OEMDATA

ID: Q163353


The information in this article applies to:
  • Microsoft Win32 Device Driver Kit (DDK) Windows 95


SUMMARY

When you write an Inf for a joystick device you commonly have an AddReg section such as:


    [Demo.AddReg]
    HKLM,%KEY_OEM%\Demo,OEMCallout,0,demo.vxd
    HKLM,%KEY_OEM%\demo,OEMData,1,20,0,0,0,8,0,0,0
    HKLM,%KEY_OEM%\demo,OEMName,0,%demo.DeviceDesc% 

OEMDATA is binary data that is detailed below.

There are two DWORDs, the first contains a set of flags, the second is the number of buttons the device has. The flags specify what kind of device it is, and which axes are present and how they should be interpreted. They are all defined in mmddk.h, except the two new flags added in DirectX 3 which are defined in dinput.h. The following flags are only used to remap the axes of an OEM defined analog joystick that is polled directly by VJoyD. They change the default behavior of VJoyD during analog polling but have no effect on the data returned by mini-drivers.

JOY_HWS_XISJ1Y    X is on the J1 Y axis
JOY_HWS_XISJ2X    X is on the J2 X axis
JOY_HWS_XISJ2Y    X is on the J2 Y axis
JOY_HWS_YISJ1X    Y is on the J1 X axis
JOY_HWS_YISJ2X    Y is on the J2 X axis
JOY_HWS_YISJ2Y    Y is on the J2 Y axis
JOY_HWS_RISJ1X    R is on the J1 X axis
JOY_HWS_RISJ1Y    R is on the J1 Y axis
JOY_HWS_RISJ2Y    R is on the J2 Y axis
JOY_HWS_ZISJ1X    Z is on the J1 X axis
JOY_HWS_ZISJ1Y    Z is on the J1 Y axis
JOY_HWS_ZISJ2X    Z is on the J2 X axis
JOY_HWS_POVISJ1X  Polled POV is on the J1 X axis
JOY_HWS_POVISJ1Y  Polled POV is on the J1 Y axis
JOY_HWS_POVISJ2X  Polled POV is on the J2 X axis 

The default behavior is:

X defaults to the J1 X axis.
Y defaults to the J1 Y axis.
R (rudder) defaults to the J2 X axis.
Z defaults to the J2 Y axis.
POV hat (if implemented as polling) defaults to the J2 Y axis.

Flags are also defined to determine whether POV data comes from an axis or from a button combination. If the described device is being polled by VJoyD, JOY_HWS_POVISBUTTONCOMBOS causes VJoyD to interpret button combinations to produce the POV, otherwise an axis is used to find it. If the described device is polled through a mini-driver, then a value in dwPOV other than POV_UNDEFINED causes an override of any other POV calculation. If JOY_HWS_POVISBUTTONCOMBOS is set, VJoyD interprets the buttons as it would for an analog joystick. If JOY_HWS_POVISBUTTONCOMBOS is not set then the POV is taken from the Z axis value if JOY_HWS_HASZ is not set, from R otherwise. Mini-drivers should avoid having the generic VJoyD interpret POV information when possible because a mini-driver usually knows more about the hardware implementation.

Additional query words: 4.00

Keywords : kbmm ntddkmmedia
Version : 4.00
Platform : WINDOWS
Issue type :


Last Reviewed: March 4, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.