Controllers/joysticks which cause constant input should be ignored #1276
Labels
controls
Keyboard, mouse and joystick/gamepad input/controls
gfx_sdl2
Specific to the SDL 2 graphics/IO backend
needs improvement
It ain't completely broken... but it ain't quite the way it should be yet
Someone reported that their (apparently) Huion H950p tablet is detected by SDL as a game controller, and unfortunately it seems to report a stylus position of 0,0 by default which SDL interprets as up-left (minimum possible value in the first two axes). They mentioned that other games like Super Tux Kart don't have this problem.
SDL doesn't have this device in its controller DB, it's just reporting a detected device so I think it's up to us to filter out devices like this. Something I've wanted to do is ignore input from controllers/joysticks which has been constant since the device was detected. This is actually a fairly common problem, also occurring when a gamepad has a stuck key (or is lying facedown somewhere). Also, the fact that we accept input from any controller/joystick on the system makes us quite susceptible to this.
The debug log shows the tablet is detected as 2 USB devices, a "Pad" and a "Touch Strip", so SDL really does think it's a gamepad?
Note that the "dylib_noload(libSDL2.so) failed" message means we couldn't call and report the output of
SDL_GameControllerTypeForIndex
.The text was updated successfully, but these errors were encountered: