| Summary: | [PATCH] hidapi: Zero out new hid_device_info structs | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Andrew Eikum <aeikum> |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
[PATCH] hidapi: Zero out new hid_device_info structs
[PATCH] hidapi: Zero out new hid_device_info structs on mac, too |
||
Created attachment 3893 [details]
[PATCH] hidapi: Zero out new hid_device_info structs on mac, too
It occurred to me to check the other backends, too. This patch applies it to the macOS backend, although they already set usage_page, so perhaps it fixes nothing. The libusb and Windows backends already use calloc.
Applied these two patches as obvious. https://hg.libsdl.org/SDL/rev/bc90ce38f1e2 |
Created attachment 3892 [details] [PATCH] hidapi: Zero out new hid_device_info structs In particular this fixes a garbage usage_page value from the hidraw hidapi-backend being used, which meant the hidapi joystick-backend wouldn't match drivers for a device.