Skip to content

Commit 638acdc

Browse files
committed
Remove the CRC from automatically generated gamepad mappings
Fixes #13127
1 parent 45eb631 commit 638acdc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/joystick/SDL_gamepad.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,6 +1857,11 @@ static GamepadMapping_t *SDL_PrivateGenerateAutomaticGamepadMapping(const char *
18571857
char name_string[128];
18581858
char mapping[1024];
18591859

1860+
// Remove the CRC from the GUID
1861+
// We already know that this GUID doesn't have a mapping without the CRC, and we want newly
1862+
// added mappings without a CRC to override this mapping.
1863+
SDL_SetJoystickGUIDCRC(&guid, 0);
1864+
18601865
// Remove any commas in the name
18611866
SDL_strlcpy(name_string, name, sizeof(name_string));
18621867
{

0 commit comments

Comments
 (0)