| Summary: | Allow non destructive SDL_GameControllerAddMappingsFromFile | ||
|---|---|---|---|
| Product: | SDL | Reporter: | x414e54 |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Mappings (DRAFT) | ||
|
Description
x414e54
2015-07-29 14:11:57 UTC
Agreed. Do you have a candidate patch for this? Created attachment 2607 [details]
Mappings (DRAFT)
Here is a quick idea I had (patch attached but I still need to test it).
Internally the mappings could use a priority system and if the priority is lower then it will not overwrite the mappings.
For now it just assumes SDL_HINT_GAMECONTROLLERCONFIG is the highest priority, the default hardcoded are the lowest and anything set via the API is medium.
This seems reasonable, have you tested your patch? I turned the priority into an enum, but your patch looks good, thanks! https://hg.libsdl.org/SDL/rev/8a059b7b01c4 |