Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Linux Xbox Controller

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 jeff8j   Members   

787
Like
0Likes
Like

Posted 09 July 2013 - 08:10 PM

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


Firefox youtube video and audio downloader MP3 MP4 OGG WEBM

https://addons.mozilla.org/en-US/firefox/addon/simple-youtube-converter/


#2 shadowisadog   Members   

3217
Like
0Likes
Like

Posted 09 July 2013 - 09:59 PM

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



#3 jeff8j   Members   

787
Like
0Likes
Like

Posted 09 July 2013 - 10:45 PM

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


Firefox youtube video and audio downloader MP3 MP4 OGG WEBM

https://addons.mozilla.org/en-US/firefox/addon/simple-youtube-converter/


#4 NightCreature83   Members   

4950
Like
0Likes
Like

Posted 10 July 2013 - 02:41 AM

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





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.