Use the original manufacturer and product strings for the joystick CRC

This allows the most information possible for the CRC string, which is used to differentiate controllers with the same VID/PID.

Fixes https://github.com/libsdl-org/SDL/issues/8724
This commit is contained in:
Sam Lantinga 2023-12-20 19:05:20 -08:00
parent 4bb5e1f0f9
commit 1f1ee6f77c
14 changed files with 37 additions and 32 deletions

View file

@ -203,7 +203,7 @@ SDL_JoystickID SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *des
}
}
hwdata->guid = SDL_CreateJoystickGUID(SDL_HARDWARE_BUS_VIRTUAL, hwdata->desc.vendor_id, hwdata->desc.product_id, 0, name, 'v', (Uint8)hwdata->desc.type);
hwdata->guid = SDL_CreateJoystickGUID(SDL_HARDWARE_BUS_VIRTUAL, hwdata->desc.vendor_id, hwdata->desc.product_id, 0, NULL, name, 'v', (Uint8)hwdata->desc.type);
/* Allocate fields for different control-types */
if (hwdata->desc.naxes > 0) {