Cleanup SDL_UDEV_GetProductSerial()

This commit is contained in:
Sam Lantinga
2025-11-12 22:23:27 -08:00
parent 54f129f765
commit dafca86123
3 changed files with 17 additions and 21 deletions

View File

@@ -1609,10 +1609,7 @@ static bool LINUX_JoystickOpen(SDL_Joystick *joystick, int device_index)
}
#ifdef SDL_USE_LIBUDEV
const char *serial = NULL;
if (SDL_UDEV_GetProductSerial(item->path, &serial)) {
joystick->serial = SDL_strdup(serial);
}
joystick->serial = SDL_UDEV_GetProductSerial(item->path);
#endif
// mark joystick as fresh and ready