| Summary: | Incorrect joystick button state after SYN_DROPPED | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Mathieu Eyraud <meyraud705> |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus, sezeroz |
| Version: | 2.0.10 | Keywords: | target-2.0.14 |
| Hardware: | All | ||
| OS: | Linux | ||
|
Description
Mathieu Eyraud
2019-10-17 15:14:46 UTC
Good catch. Do you have a patch you've tested that polls button values as well? No, I Don't have a patch and I don't know linux's syscall to make one. This is fixed in https://hg.libsdl.org/SDL/rev/2173f488608f Now we poll hats and buttons in addition to axes when we get a SYN_DROPPED, and we also follow the proper evdev procedure of throwing away the rest of the input packet (that is, until we see a SYN_REPORT) after a SYN_DROPPED event. This can be tested by building the latest testjoystick and pressing the 'L' key to sleep for 3 seconds--and going wild with the joystick in that time--to overwhelm the kernel's event buffer. SDL will now recover and resync with the current joystick state. --ryan. |