Skip to content

Add FR-TEC Raptor Mach 2 BPF fixup

This joystick would work fine if there weren't for a bug in the kernel. The kernel expects the HAT Switch to be in range [0-7], and thus stores the logical max as a __s8 (8 bits signed integer).

This device exports the HAT Switch range between [0-239] and the kernel casts the maximum value into -15, meaning that it gets unable to process it.

Fix this by changing the range of the HAT Switch both in its declaration and in the processing of the events.

Fixes #17 (closed)

@maocheia would you mind giving a shot at this MR (either recompile it, either pull the artifacts from the make release job of the latest pipeline attached to the MR and run ./install.sh in the decompressed file)

Merge request reports