Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd Mappings for Xbox 360 Controller #3458
Conversation
| @@ -1,184 +1,283 @@ | |||
| /******************************************************************************* | |||
This comment has been minimized.
This comment has been minimized.
intrigus
Oct 4, 2015
Contributor
Could you please fix this?
I don't understand what you added/removed
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
MobiDevelop
Oct 4, 2015
Member
People should rather have their git/ide settings correct. It isn't just a diff hindrance... it makes it harder to track down when specific lines are changed (via git blame).
This comment has been minimized.
This comment has been minimized.
GreenLightning
Oct 4, 2015
Author
Contributor
Sorry, didn't notice this. How can I configure git to do the right thing (via command line or eclipse)?
This comment has been minimized.
This comment has been minimized.
davebaol
Oct 4, 2015
Member
@GreenLightning
I've spent countless hours trying to fix this, really. Unfortunately nothing worked in my case.
So, if you find out a working solution, please, let me know.
This comment has been minimized.
This comment has been minimized.
GreenLightning
Oct 4, 2015
Author
Contributor
@davebaol The problem was that I committed CR-LF line endings, although I don't know how that happened as core.autocrlf is set to true (I just checked it). I fixed the line endings and now it should work.
This comment has been minimized.
This comment has been minimized.
davebaol
Oct 4, 2015
Member
@GreenLightning
That's the problem. The core.autocrlf doesn't work for me (and you)
|
I don't have an Xbox 360 controller to know whether this is correct or not... I do think it would be nice if the controller mapping could provide a way to normalize the values that are different between operating systems so that each developer didn't have to code for that. |
|
There are some tools which can map the controller settings on the OS level to another controller I've used "MotioninJoy" or "DS Tool" to map my PS3 controller to an Xbox controller. Not really related to this PR, but maybe it helps with testing. |
|
@MobiDevelop I have some ideas for a system to poll normalized values. |
controller state.
|
What do you think? |
nhydock
commented
Oct 13, 2015
|
SDL2 has a game controller mapping DB that's community maintained. Could we maybe add parsing support for the same mapping format into LibGDX? Doing such could actually be mutually beneficial as we could gain the support of all the controllers, and the LibGDX community surely has people with game controllers who could contribute back profiles for the DB. . |
|
I'm currently adding Xbox360 mappings to libGDX myself in a more light-weight manner. I'll merge this manually with your changes. Thanks! |
|
If you want me to test the mappings I have Windows and OS X and I can run Linux in a VM... |
GreenLightning commentedOct 4, 2015
This adds mappings for the Xbox 360 controller. See #2185 for my previous attempt.
Tested on Windows, OS X and Linux.
The GWT emulation is based on the Ouya emulation and the uses the Standard Gamepad Layout. However, I could not test the GWT emulation, because libgdx does not recognize my controller in the browser (it shows up fine here).
I also refactored the controller test so that it does not spam you with axis updates, but instead only shows the last value.