|
@@ -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)) {
|