mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 17:06:25 +00:00
Improved detection of third party PS4 and PS5 controllers
This commit is contained in:
@@ -73,6 +73,7 @@ typedef struct _SDL_HIDAPI_Device
|
||||
int interface_protocol;
|
||||
Uint16 usage_page; /* Available on Windows and Mac OS X */
|
||||
Uint16 usage; /* Available on Windows and Mac OS X */
|
||||
SDL_GameControllerType type;
|
||||
|
||||
struct _SDL_HIDAPI_DeviceDriver *driver;
|
||||
void *context;
|
||||
@@ -144,6 +145,9 @@ extern SDL_bool HIDAPI_IsDeviceTypePresent(SDL_GameControllerType type);
|
||||
/* 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, const char *name);
|
||||
|
||||
/* Return the type of a game controller if it's present and supported */
|
||||
extern SDL_GameControllerType HIDAPI_GetGameControllerTypeFromGUID(SDL_JoystickGUID guid);
|
||||
|
||||
extern void HIDAPI_UpdateDevices(void);
|
||||
extern void HIDAPI_SetDeviceName(SDL_HIDAPI_Device *device, const char *name);
|
||||
extern void HIDAPI_SetDeviceProduct(SDL_HIDAPI_Device *device, Uint16 product_id);
|
||||
|
Reference in New Issue
Block a user