Xinput is a standard for controllers. M$ controlls that standard. If you want to make an Xinput device, you need to pay M$. Even on other devices that implement that standard.
They HID libraries do work @bateske . I tested it with my phone. Only problem is my program doesn’t support mouse movement yet, so interacting with touchscreen apps is an issue.
It was originally developed as a replacement for Microsoft’s DirectInput and was used for both Windows and Xbox 360.
(Microsoft went through a phase of making Windows and Xbox very compatible, see XNA and its evolved open-source form Monogame (long story).)
That compatibility is what sparked Xbox controllers being used for Windows games so much.
Naturally people then wanted to port it to other operating systems so it became an ‘open for a fee’ standard, and more controllers got made because there was suddenly a market for them.
*End of semi-factual abridged history of XInput*
(The API is basically completely geared towards Xbox controllers, it supports 4 axes, 10 buttons and 2 triggers to match Xbox exactly. It isn’t intented for mice and keyboards, but it’s possible to make a keyboard/mouse pretend to be an XInput device. It’s more difficult to make an XInput device pretend to be a mouse/keyboard though, not impossible, but somewhat difficult.)
Yeah, what I was trying to say is ideally you’d want to emulate an Xinput controller for maximum compatibility, but you can’t without paying a “certification” fee.
Out of interest I tested it on my Windows computer and it seemed to work fine (after a bit of fiddling and updating to the latest Joystick library), so it’s probably a Linux-specific bug.
Did you use the hex file or did you compile the source?
And did you use the latest version of the Joystick library?
They’re currently on version 2.0.3 and @eried linked to 1.0.1, a lot has changed and it looks like the newer version is more efficient and has more features (and still compiles correctly), so they might have fixed some Linux-specific bugs.
If you’ve had issues with other controllers then it probably is xpad’s fault.
I’d say raise an issue but it looks like they’ve already got quite a lot of those, so it would probably be a while until it was fixed depending on the exact issues.
I’m not surprised the Steam controller worked well, Valve have been very Linux-conscious in recent years. (Plus it had to work with ‘Steam Machines’, which are Linux based.)