| Summary: | SDL_JoystickGetGUID() not unique on Linux | ||
|---|---|---|---|
| Product: | SDL | Reporter: | grumbel |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | bradhugh |
| Version: | 2.0.1 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
|
Description
grumbel
2013-12-24 16:19:29 UTC
That is correct, the GUID is used to identify the type of controller (and what game controller mapping should be used) As far as I know there is no way to uniquely identify a specific device. (In reply to Sam Lantinga from comment #1) > That is correct, the GUID is used to identify the type of controller (and > what game controller mapping should be used) > > As far as I know there is no way to uniquely identify a specific device. So the GUID values provided by SDL for joysticks are not intended to be unique per-device? There is no way at all to get unique ID's per device? There is unique information provided by most USB devices that could be obtained. For instance, most devices expose a SerialNumber as well as LocationID which further identify devices. MAME needs a way to uniquely identify two devices of the same type to support multiple controllers of the same type. One way to fix this issue would be to add an id into the GUID. So the first controller of a given type gets the regular GUID, if a second controller of the same type is discovered it gets GUID+1, third one gets GUID+2, etc. |