Linux Xbox Controller

Started by
2 comments, last by NightCreature83 10 years, 9 months ago

I would like to use a xbox 360 controller for my game in linux just like in windows. I can find some information about a driver but from what I hear it doesnt need it after kernel 2.6. My problem though is I dont know where to start I cant find any examples or apis to use to access the controllers. Can anyone help point me in the right direction? Thanks

Advertisement

PyGame, SDL, ect can all read input from the Joystick. From there it is just a matter of knowing the button codes.

Reading Joystick input in SDL

PyGame Joystick API

SFML Joystick

Ok so I guess it the same as a joystick apparently. Ill have to look into how to read the joystick. Thanks

The only thing I am missing from that is the device packet number as it will only change that value when actual input on the pad has changed. This is an easy way of checking whether there is any input coming from an XInput device. Unless SDL or PyGame already deal with this.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

This topic is closed to new replies.

Advertisement