Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WinRT build fix
  • Loading branch information
DavidLudwig committed Jun 26, 2014
1 parent 95864f8 commit a838a56
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/joystick/winrt/SDL_xinputjoystick.c
Expand Up @@ -524,6 +524,17 @@ SDL_bool SDL_SYS_IsXInputDeviceIndex(int device_index)
return SDL_TRUE;
}

SDL_bool SDL_SYS_IsXInputGamepad_DeviceIndex(int device_index)
{
XINPUT_CAPABILITIES deviceCaps;

if (SDL_XInput_GetDeviceCapabilities(device_index, &deviceCaps) != 0) {
return SDL_FALSE;
}

return (deviceCaps.SubType == XINPUT_DEVSUBTYPE_GAMEPAD);
}

#endif /* SDL_JOYSTICK_XINPUT */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit a838a56

Please sign in to comment.