Use a unified name list for Xbox 360 and Xbox One controllers for drivers that can handle both

This commit is contained in:
Sam Lantinga 2018-08-15 23:14:43 -07:00
parent 1ac1a37f85
commit 8235f84320
4 changed files with 182 additions and 189 deletions

View file

@ -33,7 +33,7 @@
#ifdef __WINDOWS__
/* On Windows, Xbox controllers are handled by the XInput driver */
#undef SDL_JOYSTICK_HIDAPI_XBOX360
//#undef SDL_JOYSTICK_HIDAPI_XBOX360
#undef SDL_JOYSTICK_HIDAPI_XBOXONE
#endif
@ -65,6 +65,9 @@ extern SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverXboxOne;
/* Return true if a HID device is present and supported as a joystick */
extern SDL_bool HIDAPI_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version);
/* Return the name of an Xbox 360 or Xbox One controller */
extern const char *HIDAPI_XboxControllerName(Uint16 vendor_id, Uint16 product_id);
#endif /* SDL_JOYSTICK_HIDAPI_H */
/* vi: set ts=4 sw=4 expandtab: */