mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-18 17:28:13 +00:00
Improved detection of third party PS4 and PS5 controllers
This commit is contained in:
@@ -2167,6 +2167,11 @@ SDL_GetJoystickGameControllerTypeFromGUID(SDL_JoystickGUID guid, const char *nam
|
||||
if (SDL_IsJoystickVirtual(guid)) {
|
||||
return SDL_CONTROLLER_TYPE_VIRTUAL;
|
||||
}
|
||||
#ifdef SDL_JOYSTICK_HIDAPI
|
||||
if (SDL_IsJoystickHIDAPI(guid)) {
|
||||
return HIDAPI_GetGameControllerTypeFromGUID(guid);
|
||||
}
|
||||
#endif /* SDL_JOYSTICK_HIDAPI */
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user