Grumbel / evtest-qt

Linux Joystick Tester for Qt
GNU General Public License v3.0
43 stars 6 forks source link

Recognize events with high numbers (like /dev/input/event256) #11

Closed grafov closed 3 years ago

grafov commented 3 years ago

Sometime the devices set up files like /dev/input/event256 and even with higher numbers. The most of devices start from 0 and added incrementally. I don't see more than 31 device though. I don't understand the rules for this numeration. But all the devices are visible and works. Example output (some devices missed):

No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:  Saitek Saitek Pro Flight Quadrant
/dev/input/event1:  www.vkb-flightsimcontrols.com © Alex Oz 2011 GTX Throttle
...
/dev/input/event30: ErgoDox EZ ErgoDox EZ Keyboard
/dev/input/event31: ATMEL/VIRPIL/190930 BRD Rudder V3
/dev/input/event256:    © Alex Oz 2012-2019  VKB-Sim Gladiator NXT R
/dev/input/event257:    opentrack headpose

In the example latest two devices are: VKB joystick (hardware thing) and virtual joystick created by Opentrack. With evtest I can check the buttons and axis of these devices with high numbers. But evtest-qt doesn't see the events with numbers > 255.

I tried to make soft links to these devices this way:

lrwxrwxrwx   1 root root        8 июн 20 16:51 event56 -> event256
lrwxrwxrwx   1 root root        8 июн 20 16:50 event57 -> event257

evtest output:
/dev/input/event56: © Alex Oz 2012-2019  VKB-Sim Gladiator NXT R
/dev/input/event57: opentrack headpose

In most of cases this workaround worked for evtest-qt. For the example above I've got working VKB on event56 but error with event57. What I expected that the evtest-qt would handle devices the same way as evtest cli.

I not sure the bug is the evtest-qt bug. For example X-Plane on Linux also failed with these high numbered devices. But for example War Thunder on Linux recognize them ok.

More information about my setup:

grafov commented 3 years ago

I downloaded the source code of the master branch and build it locally. Also I build the tag v0.2.0. The bug didn't occured in the master but it has the place in v0.2.0.

grafov commented 3 years ago

I looked for the code and found the problem was fixed in the commit 591fd22162c4. Ok, my distro just uses the old version.