| Summary: | Add ability to get the device path of a joystick | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sjoerd Simons <sjoerd.simons> |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | dimitriy.ryazantcev |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | Proposed patch | ||
I proposing to extend this approach with ability to return device interface path on Windows too.
I talking about string like `\\?\HID#VID_203A&PID_FFFC&MI_01#7&2de99099&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}` that could be used for example to acquire audio interface on that PS4/5 controller via CM_* or SetupDi* API.
|
Created attachment 4333 [details] Proposed patch Sometimes it can be useful to understand which device a Joystick actually refers to; E.g. to get information for it that SDL doesn't support (which usb port is it connected to, what's the bt mac as exposed of usb) or functionality not supported by SDL (firmware updates, LED controls etc). The attached patch adds the ability on linux to get the underlying device path, which can then futher be used with other APIs with the device (e.g. libudev, fwupd etc). The patch adds a Linux specific function; Unsure if that's OK for SDL or whether it should be done in a more cross-platform name (Though i have no idea what a good system device indentifier would be on other systems).