| Summary: | X360 controller does not stop rumbling when stopped without a delay | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Leszek Godlewski <libsdl-bugzilla> |
| Component: | haptic | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | icculus, sdl |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | gcc fftest.c -o fftest -lSDL2 | ||
Putting this bug on my TODO list. --ryan.
Attachment #1192 [details] works correctly on my machine. Maybe it's a driver bug? What distro+version are you running?
--ryan.
Hmm. It's Debian testing amd64, on the libsdl2 that's bundled with the most recent Steam Linux Runtime. I'll make another test on the tip of the trunk of libsdl2 next week. I have the same problem but with a different code: https://gist.github.com/karolherbst/413135d8152797615fac it seems to work fine after a delay of 700 to 800 microsecconds. The issue for me is, that a SDL_HapticStopEffect call directly after SDL_HapticUpdateEffect triggers the issue for me. I am using linux-3.18.3 and libsdl2-2.0.3-r200 (from Gentoo Linux) with commit 5192470456ae8f82f88bd3249d213a437b5906f1 patched in. this seems to be a kernel bug: https://gist.github.com/karolherbst/631e5a30347a28ae6b56 this simple code also triggers the bug sometimes. It has to be run with a single argument, passing the used device ( /dev/input/eventXX ) for reference: https://bugzilla.kernel.org/show_bug.cgi?id=91991 Closing this as a driver bug. --ryan. |
Created attachment 1192 [details] gcc fftest.c -o fftest -lSDL2 When running the sample code mentioned in the SDL_haptic.h header, the Xbox 360 controller keeps rumbling after the program exits. Even when an explicit call to SDL_HapticRumbleStop() after the delay is added, it keeps rumbling. However, when the SDL_Delay() argument is increased by 4 ms (or more), or the SDL_HapticRumblePlay() duration argument is decreased by the same number of milliseconds, the controller stops rumbling as expected. Attached is a simple program with 100% reproducibility on my machine.