mirror of https://github.com/encounter/SDL.git
Patched to compile on Windows.
This commit is contained in:
parent
e0ad1021a5
commit
78026f5492
|
@ -340,16 +340,16 @@ EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
|
|||
{
|
||||
JoyStick_DeviceData *pNewJoystick;
|
||||
JoyStick_DeviceData *pPrevJoystick = NULL;
|
||||
const DWORD devtype = (pdidInstance->dwDevType & 0xFF);
|
||||
|
||||
if ((devtype != DI8DEVTYPE_JOYSTICK) && (devtype != DI8DEVTYPE_GAMEPAD)) {
|
||||
return DIENUM_CONTINUE; /* Ignore touchpads, etc. */
|
||||
}
|
||||
|
||||
if (SDL_IsXInputDevice(&pdidInstance->guidProduct)) {
|
||||
return DIENUM_CONTINUE; /* ignore XInput devices here, keep going. */
|
||||
}
|
||||
|
||||
const DWORD devtype = (pdidInstance->dwDevType & 0xFF);
|
||||
if ((devtype != DI8DEVTYPE_JOYSTICK) && (devtype != DI8DEVTYPE_GAMEPAD)) {
|
||||
return DIENUM_CONTINUE; /* Ignore touchpads, etc. */
|
||||
}
|
||||
|
||||
pNewJoystick = *(JoyStick_DeviceData **)pContext;
|
||||
while (pNewJoystick) {
|
||||
if (!SDL_memcmp(&pNewJoystick->dxdevice.guidInstance, &pdidInstance->guidInstance, sizeof(pNewJoystick->dxdevice.guidInstance))) {
|
||||
|
|
Loading…
Reference in New Issue