mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-03 17:05:41 +00:00
Use crc16 return value when calculating GUID
Fixes the regression introduced by 919cd56b20
(cherry picked from commit a2e05480d63cac530269c846422e7de3b44e830f)
This commit is contained in:
parent
39a0013900
commit
e7c4575719
|
@ -2458,11 +2458,11 @@ SDL_JoystickGUID SDL_CreateJoystickGUID(Uint16 bus, Uint16 vendor, Uint16 produc
|
|||
SDL_zero(guid);
|
||||
|
||||
if (vendor_name && *vendor_name && product_name && *product_name) {
|
||||
SDL_crc16(crc, vendor_name, SDL_strlen(vendor_name));
|
||||
SDL_crc16(crc, " ", 1);
|
||||
SDL_crc16(crc, product_name, SDL_strlen(product_name));
|
||||
crc = SDL_crc16(crc, vendor_name, SDL_strlen(vendor_name));
|
||||
crc = SDL_crc16(crc, " ", 1);
|
||||
crc = SDL_crc16(crc, product_name, SDL_strlen(product_name));
|
||||
} else if (product_name) {
|
||||
SDL_crc16(crc, product_name, SDL_strlen(product_name));
|
||||
crc = SDL_crc16(crc, product_name, SDL_strlen(product_name));
|
||||
}
|
||||
|
||||
/* We only need 16 bits for each of these; space them out to fill 128. */
|
||||
|
|
Loading…
Reference in a new issue