Delcom Products
Welcome to Delcom Products.
Home->Web Notes

WebNoteId: 21
Title: USB Joystick Failures

Summary: This web note describes how to correct the USB joystick failures with Windows DirectX.

DATE: Oct 1, 2020

EFFECTS: OS: Windows 7,10
Devices: All Delcom USB HID device with G2 firmware versions 56 to 61.
Software: All software applications that use DirectX to access the joystick.

PROBLEM: In firmware v56 we added support for Consumer Controls( Vol Up, Dwn, ,Play, Pause,…) and System Controls(Wake,Sleep,Off). In the new version of DirectX, theses controls are also considered DirectX devices and made available to the user. When using the common Devtype of DI8DEVCLASS_GAMECTRL(0x04) these other controls will also be returned to the user. See the DirectX enumeration command line utility to display all the devices returned by DirectX enumDiX.exe.

When we added the SC and CC controls they were added before the Game Controls(joystick) in the devices descriptor HID usage table. This causes the OS to return the handle to the SC control first and hence a program opening this device would get the SC device handle and not the GC device handle and would fail. We have made a new firmware (version 62) that reports the GC before the SC and CC. This will return the GC control first and fix this issue. Note the multiple Delcom Devices devices returned by DirectX is normal as this is a composite device.

SOLUTION: 1) Use firmware version v63 that returns the GC (Game Control) first. All devices ship after 10/8/2020 will have v63 or greater.

2) Update your program to request only DevTypes of GamePads when enumerating the joystick device from DirectX. The commonly used DevType is DI8DEVCLASS_GAMECTRL (0x04), this DevType will return all joystick, game controller, gamepads, consumers controls and other devices. A DevType of DI8DEVTYPE_GAMEPAD (0x15) will only return the correct GamePad device.

// Create the device
DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&di, NULL);
// Enumerate the devices

Optionally you can also test if the return device is of a DevType DI8DEVTYPE_GAMEPAD (0x15) by checking the dwDevtype returned by GetCapabilities.

if( (capabilities.dwDevType & 0xFF) == DI8DEVTYPE_GAMEPAD) {
// Correct device found!

3)Change the device PID to the alternate (0xA080) using DelcomSetPID.

NOTES: If after applying one of the above solutions the issue is still present, then you will need to uninstall the device so that the OS re-enumerates the device. To remove the device uninstall all the USB Input Devices in your system. Then plug the device back in and it will automatically re-numerate the device.

Instructions to delete all the USB Input Devices in your system:
  1. First UNPLUG the device from your system.
  2. OPEN Windows Device Manager
  3. Under the View tab, ENABLE Show Hidden Devices
  4. Open the tree folder Human Interface Device
  5. Delete ONLY the hidden(greyed out) devices called USB Input Device

homeproductsservicescontact usshopping cartlegal   © Copyright 2023 Delcom Products Inc - R720 11/30/2023