Browse Source

Fixed replacing existing specific gamepad mappings

If the first mapping we see doesn't have a CRC, continue looking for another exact CRC match.

Fixes testautomation --filter TestVirtualJoystick

(cherry picked from commit 582696687386161fee714bc08433f12b4f7aae02)
Sam Lantinga 2 months ago
parent
commit
8d578d590f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/joystick/SDL_gamepad.c

+ 1 - 1
src/joystick/SDL_gamepad.c

@@ -913,7 +913,7 @@ static GamepadMapping_t *SDL_PrivateMatchGamepadMappingForGUID(SDL_GUID guid, bo
                 // An exact match, including CRC
                 return mapping;
             } else if (crc && exact_match_crc) {
-                return NULL;
+                continue;
             }
 
             if (!best_match) {