mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Remove not used DirectInput ignored_devices list
This commit is contained in:
parent
adc2d362ba
commit
f2f759dca3
@ -399,7 +399,6 @@ EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
|
|||||||
{
|
{
|
||||||
JoyStick_DeviceData *pNewJoystick;
|
JoyStick_DeviceData *pNewJoystick;
|
||||||
JoyStick_DeviceData *pPrevJoystick = NULL;
|
JoyStick_DeviceData *pPrevJoystick = NULL;
|
||||||
const DWORD devtype = (pdidInstance->dwDevType & 0xFF);
|
|
||||||
Uint16 *guid16;
|
Uint16 *guid16;
|
||||||
Uint16 vendor = 0;
|
Uint16 vendor = 0;
|
||||||
Uint16 product = 0;
|
Uint16 product = 0;
|
||||||
@ -407,22 +406,6 @@ EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
|
|||||||
WCHAR hidPath[MAX_PATH];
|
WCHAR hidPath[MAX_PATH];
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
if (devtype == DI8DEVTYPE_SUPPLEMENTAL) {
|
|
||||||
/* 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;
|
|
||||||
|
|
||||||
for (i = 0; i < SDL_arraysize(ignored_devices); ++i) {
|
|
||||||
if (pdidInstance->guidProduct.Data1 == ignored_devices[i]) {
|
|
||||||
return DIENUM_CONTINUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SDL_IsXInputDevice(pdidInstance->tszProductName, &pdidInstance->guidProduct)) {
|
if (SDL_IsXInputDevice(pdidInstance->tszProductName, &pdidInstance->guidProduct)) {
|
||||||
return DIENUM_CONTINUE; /* ignore XInput devices here, keep going. */
|
return DIENUM_CONTINUE; /* ignore XInput devices here, keep going. */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user