Added a function to get the controller firmware version

This commit is contained in:
Sam Lantinga 2022-06-03 18:49:41 -07:00
parent d6143ab369
commit 423141bfca
8 changed files with 45 additions and 0 deletions

View file

@ -2702,6 +2702,14 @@ Uint16 SDL_JoystickGetProductVersion(SDL_Joystick *joystick)
return version;
}
Uint16 SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick)
{
if (!SDL_PrivateJoystickValid(joystick)) {
return 0;
}
return joystick->firmware_version;
}
const char *SDL_JoystickGetSerial(SDL_Joystick *joystick)
{
if (!SDL_PrivateJoystickValid(joystick)) {