WinRT build fix
authorDavid Ludwig <dludwig@pobox.com>
Wed, 25 Jun 2014 22:03:05 -0400
changeset 89576bed922bc4dd
parent 8956 a99e30f2bf0a
child 8958 ef544b7b4c4f
WinRT build fix
src/joystick/winrt/SDL_xinputjoystick.c
     1.1 --- a/src/joystick/winrt/SDL_xinputjoystick.c	Wed Jun 25 17:24:06 2014 -0400
     1.2 +++ b/src/joystick/winrt/SDL_xinputjoystick.c	Wed Jun 25 22:03:05 2014 -0400
     1.3 @@ -524,6 +524,17 @@
     1.4      return SDL_TRUE;
     1.5  }
     1.6  
     1.7 +SDL_bool SDL_SYS_IsXInputGamepad_DeviceIndex(int device_index)
     1.8 +{
     1.9 +    XINPUT_CAPABILITIES deviceCaps;
    1.10 +
    1.11 +    if (SDL_XInput_GetDeviceCapabilities(device_index, &deviceCaps) != 0) {
    1.12 +        return SDL_FALSE;
    1.13 +    }
    1.14 +
    1.15 +    return (deviceCaps.SubType == XINPUT_DEVSUBTYPE_GAMEPAD);
    1.16 +}
    1.17 +
    1.18  #endif /* SDL_JOYSTICK_XINPUT */
    1.19  
    1.20  /* vi: set ts=4 sw=4 expandtab: */