Description
I'm not sure if this is a bug or a feature, but it's confusing behavior, so likely more towards the bug category.
When automatic gamepad mappings are generated, the CRC is included in the GUID used. This means that if a mapping for that gamepad is added after the automatic mapping is generated, the added mapping will be ignored, unless the added mapping includes the CRC. This essentially means you have to add mappings before calling SDL_Init, as if any gamepads are plugged in during SDL_Init, they'll have automatically generated mappings created, and any mappings added later will not be used.
What makes me think this is a bug is SDL_PrivateMatchGamepadMappingForGUID
has the following comment in it.
// Clear the CRC from the GUID for matching, the mappings never include it in the GUID
SDL_SetJoystickGUIDCRC(&guid, 0);
Which makes me think adding a mapping with a GUID included is a bug.