libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.71k stars 1.79k forks source link

Missing axes for joysticks with unusual amount of axes. #6868

Closed DeltaTimo closed 10 months ago

DeltaTimo commented 1 year ago

Joysticks like the Logitech G940 Flight System are missing some axes (sliders, toe brakes and a joystick hat) following commit 0b8e796e2c09a91637f3a455dbb477984ff99354 .

Problem seen on OS: Linux 6.0.11-1-MANJARO

Problem seen on SDL Version: 2.0.22.r52.g0b8e796e2-1 to 2.26.0-1

Problem seen on Desktop: i3 X11

slouken commented 11 months ago

@atfrase, can you take a look at this?

atfrase commented 11 months ago

Sure, happy to take a look, though I probably don't have any device handy that exhibits this issue. @DeltaTimo if I point you to a code line to change (or send a patch file) to enable more debugging info, are you able to compile from source to run that with your device?

DeltaTimo commented 11 months ago

Sure, happy to take a look, though I probably don't have any device handy that exhibits this issue. @DeltaTimo if I point you to a code line to change (or send a patch file) to enable more debugging info, are you able to compile from source to run that with your device?

Sure!

But I'm a bit boggled at the moment. At the time of writing this issue I was probably running the (default) hid_logitech kernel module, whereas at the moment I'm using hid_logitech_next (from atlesn/g940-linux).

With hid_logitech I get 8 axes in SDL2 and with hid_logitech_next I get 14 without any changes to the current SDL release.

With hid_logitech (probably) at the time, I simply reverted 0b8e796 to regain all 14 axes, but now, I cannot reproduce the fix. I've switched back to hid_logitech temporarily yesterday and I still get 8 axes, no matter if that commit is reverted or not. At this point, I'm not even sure if I was using hid_logitech back then at all and it makes me wonder if hid_logitech completely gobbles those axes and this perhaps isn't even an issue SDL can fix.

slouken commented 10 months ago

Okay, I'll close this for now, feel free to reopen it if you find out what's happening here.