Skip to content
Browse files
Fixed bug 3533 - Enumeration joystick devices omitted during directin…
…put enumeration


The logic which decides if a device enumerated via the direct input system in the function EnumJoysticksCallback in SDL_dinputjoystick.c is processed is discarding valid joystick devices due to the assumption that devices of the type DI8DEVTYPE_SUPPLEMENTAL are not valid devices.

This change was added with 2.0.4 with this commit that is linked to this bug report which indicates that in that case devices of the type DI8DEVTYPE_SUPPLEMENTAL were not desirable as they caused a singular device to emit multiple "device added" events.

Since then there appear to have been a few fixes to handle devices that fall into various other classes in the following two commits: and

Two devices I have reports of failing to be listed when the DI8DEVTYPE_SUPPLEMENTAL type is excluded are ECS Gametric Throttle and Thrustmaster MFD Cougar.

Sam Lantinga

I verified that the OUYA controller shows up as a single device with this change, so I've reverted the change to ignore supplemental devices, leaving framework in place to easily add devices that we want to ignore.
  • Loading branch information
slouken committed Jan 18, 2017
1 parent dd007e3 commit b0c5ceef7d1964524e3ca0ce70f11cd0239c6b87
Showing with 14 additions and 1 deletion.
  1. +14 −1 src/joystick/windows/SDL_dinputjoystick.c
@@ -356,7 +356,20 @@ EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
Uint16 *guid16;

return DIENUM_CONTINUE; /* Ignore touchpads, etc. */
/* Add any supplemental devices that should be ignored here */
static DWORD ignored_devices[] = {
unsigned int i;
SDL_bool should_ignore = SDL_FALSE;

for (i = 0; i < SDL_arraysize(ignored_devices); ++i) {
if (pdidInstance->guidProduct.Data1 == ignored_devices[i]) {

if (SDL_IsXInputDevice(&pdidInstance->guidProduct)) {

0 comments on commit b0c5cee

Please sign in to comment.