Slick Forums

Discuss the Slick 2D Library
It is currently Tue Sep 25, 2018 5:28 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sun Apr 24, 2016 2:49 am 
Offline

Joined: Sun Apr 24, 2016 2:43 am
Posts: 1
I am using the ControllerListener class to capture controller keypresses and everything works fine on the computer I'm developing my game on but I just tested my game on another computer and it's having some issues detecting the first Xbox controller. Essentially, this other computers has a few wireless keyboards and mice setup on it and I guess one of those is somehow being detected as a controller by Slick, because when I test an Xbox controller on the computer, the first controller controls Player 2 (the 2nd controls Player 3, etc.)

I used getControllerCount to check this other computer and it detects 4 controllers when there's only 1 xbox controller connected, and 6 when there are 3 xbox controllers connected. So clearly these other devices are interfering.

Now when Slick initializes, it gives a list of the controllers it detects to the Java console. Is there a way to access this list from the code to say, manually go through the list and only enumerate controllers that are actual Xbox controllers? Or maybe drop out controllers that have Mouse or Keyboard in their name?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group