Skip to content

Commit

Permalink
Patched to compile on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Apr 8, 2015
1 parent e0ad102 commit 78026f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/joystick/windows/SDL_dinputjoystick.c
Expand Up @@ -340,16 +340,16 @@ EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
{
JoyStick_DeviceData *pNewJoystick;
JoyStick_DeviceData *pPrevJoystick = NULL;

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. */
}

if (SDL_IsXInputDevice(&pdidInstance->guidProduct)) {
return DIENUM_CONTINUE; /* ignore XInput devices here, keep going. */
}

pNewJoystick = *(JoyStick_DeviceData **)pContext;
while (pNewJoystick) {
if (!SDL_memcmp(&pNewJoystick->dxdevice.guidInstance, &pdidInstance->guidInstance, sizeof(pNewJoystick->dxdevice.guidInstance))) {
Expand Down

0 comments on commit 78026f5

Please sign in to comment.