Looks just like the SDL hidapi driver so this should be okay! The only
thing I'm unsure of is the axis inversion, in SDL we read the axes
directly and invert them in the SDL_GameController configuration.
Someone also added a bunch of dead zone work after I wrote the driver,
but unfortunately I don't know the details of that.
The meat of our driver is here...
https://hg.libsdl.org/SDL/file/4298bf108b06/src/joystick/hidapi/SDL_hidapi_gamecube.c#l226
... and the SDL_GameController config is here:
https://hg.libsdl.org/SDL/file/4298bf108b06/src/joystick/SDL_gamecontrollerdb.h#l614
The '~' char denotes an input value that is flipped after it is read
from the joystick; the vendor/product/version matchup may cause this
config to accidentally flip the axes twice when using the kernel driver.
-Ethan
On 5/10/20 08:45, Bastien Nocera wrote:
On Wed, 2020-05-06 at 02:47 +0200, François-Xavier Carton wrote:
The hid-gamecube-adapter driver supports Nintendo Gamecube Controller
Adapters. They are USB devices on which up to four Nintendo Gamecube
Controllers can be plugged. The driver create independent input
devices
as controllers are connected.
I think Ethan might be interested in testing this, as he's been using a
user-space version of that in the past:
https://patchwork.kernel.org/patch/11530107/