- detect that you tried to open a gamecontroller in xinput mode and failed, then re-get the mapping for the dinput variant you did open (and most likely now just fail the open)

CR: SamL
This commit is contained in:
Sam Lantinga
2013-08-21 10:32:04 -07:00
parent 05d8c2dcd2
commit 9faefccd48
3 changed files with 28 additions and 0 deletions

View File

@@ -1776,6 +1776,12 @@ SDL_bool SDL_SYS_IsXInputDeviceIndex(int device_index)
return device->bXInputDevice;
}
/* return SDL_TRUE if this device was opened with XInput */
SDL_bool SDL_SYS_IsXInputJoystick(SDL_Joystick * joystick)
{
return joystick->hwdata->bXInputDevice;
}
#endif /* SDL_JOYSTICK_DINPUT */
/* vi: set ts=4 sw=4 expandtab: */