| Summary: | Add a way to extend the values in controller_type.h | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sam Lantinga <slouken> |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | icculus |
| Version: | 2.0.10 | Keywords: | target-2.0.12 |
| Hardware: | All | ||
| OS: | All | ||
|
Description
Sam Lantinga
2019-11-05 20:05:59 UTC
Sam, do you have a plan for this already, or should I tackle it? (I assume the plan is SDL looks in a few standard places and merges any data found in them: somewhere in the standard Steam Runtime location, /etc/SDL_gamecontrollerdb.txt, $HOME/.SDL_gamecontrollerdb.txt or whatever. Or maybe just an environment variable like SDL_GAEMCONTROLLERDB_FILE that Steam sets?) --ryan. Probably we'll want a hint for this, e.g. SDL_HINT_CONTROLLER_TYPES, parse it into a list of override entries at startup and again if the hint changes.
I'm not sure about the format of the hint...
Maybe a comma separated list, e.g.
VID/PID=VALUE,VID/PID=VALUE,etc.
The VALUE should probably be parsed both as string ("XBox360", "PS3", etc.) and as numeric value. The numeric value should probably use the new SDL_GameControllerType enumeration values rather than the Valve values in the controller_types.h header.
Thoughts?
Implemented! https://hg.libsdl.org/SDL/rev/9d16201f3a3f |