Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
11 additions
and
0 deletions.
-
+11
−0
src/joystick/winrt/SDL_xinputjoystick.c
|
@@ -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: */ |
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.