LaurentGomila/SFML — pull request #293 by ryanfields (2012-10-05 14:40:02+00:00)
Title: Fix for unpredictable joystick ordering on OS X.

Fixes unpredictable or unintentional joystick button ordering by sorting
buttons according to their HID Usage property. This allows SFML to
adhere to a manufacturer's (or driver implentation's) intended button
ordering.

This change is the same one I posted on the forums under the topic http://en.sfml-dev.org/forums/index.php?topic=9254.0

I'm not trying to rush anyone with this pull request. I just figured if my solution was accepted, it'd be convenient to have the code ready and waiting in a pull request. If I shouldn't be doing this, please let me know. I'm not sure if there's a more appropriate of official way I should be contributing.

Hiura mentioned on the forum that he'd test this with his own devices when he has time, so this pull request should be left un-pulled until he gives a go-ahead on it.