I'm porting an application that uses the Xbox controller to Linux. On windows, it essentially just uses XInputGetState()
to read the state of the controller, so I'm looking for a replacement for that function on Linux.
I see that wine hasn't implemented XInputGetState()
, but at the same time there are a large number of games supporting the Xbox controller on Linux, so it's doable.
Does anyone know what library can be used to interact with an Xbox controller on Linux?
You can either:
linux/joystick.h
yourselfThe (1-2) solutions are mainly C
, but so is the XInput API, so you probably can deal with it.
I would probably go with number 1, because that approach should have the best documentation.