Skip to content

Commit

Permalink
Fixed getting the VID/PID of a virtual joystick
Browse files Browse the repository at this point in the history
(cherry picked from commit e40a961)
(cherry picked from commit 29a4c5e)
  • Loading branch information
slouken committed Dec 28, 2022
1 parent 278c78e commit 81975cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/SDL_joystick.c
Expand Up @@ -1811,7 +1811,7 @@ void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *prod
Uint16 *guid16 = (Uint16 *)guid.data;
Uint16 bus = SDL_SwapLE16(guid16[0]);

if (bus < ' ' && guid16[3] == 0x0000 && guid16[5] == 0x0000) {
if ((bus < ' ' || bus == SDL_HARDWARE_BUS_VIRTUAL) && guid16[3] == 0x0000 && guid16[5] == 0x0000) {
/* This GUID fits the standard form:
* 16-bit bus
* 16-bit CRC16 of the joystick name (can be zero)
Expand Down

0 comments on commit 81975cc

Please sign in to comment.