diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c index 1d3616683..3cd31314e 100644 --- a/src/joystick/windows/SDL_dinputjoystick.c +++ b/src/joystick/windows/SDL_dinputjoystick.c @@ -356,7 +356,20 @@ EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext) Uint16 *guid16; if (devtype == DI8DEVTYPE_SUPPLEMENTAL) { - return DIENUM_CONTINUE; /* Ignore touchpads, etc. */ + /* Add any supplemental devices that should be ignored here */ +#define MAKE_TABLE_ENTRY(VID, PID) ((((DWORD)PID)<<16)|VID) + static DWORD ignored_devices[] = { + MAKE_TABLE_ENTRY(0, 0) + }; +#undef MAKE_TABLE_ENTRY + 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]) { + return DIENUM_CONTINUE; + } + } } if (SDL_IsXInputDevice(&pdidInstance->guidProduct)) {