HaxePunk/HaxePunk — pull request #286 by Gama11 (2014-05-03 13:40:46+00:00)
Title: Joystick: update XBOX_GAMEPAD for OpenFL 1.4.0

OpenFL 1.4.0 broke the button IDs for Xbox 360 controllers, likely due to the upgrade to SDL 2.0.1. From the [changelog](https://forums.libsdl.org/viewtopic.php?p=40162):

>Fixed detecting a mixture of XInput and DirectInput controllers

Notable differences:

- The dpad can no longer be checked via `JoystickEvent.HAT_MOVE`
- The Xbox button is now detectable - I added `XBOX_BUTTON` for this
- The left and right trigger are now axes

It seems like the values are different on windows, linux and mac, but oh well. There are a few redundancies, but I feel like it's more readable to have a dedicated section for each OS.

Feel free to double-check these, I think they should work with HaxePunk as they do work with HaxeFlixel, and the gamepad API is pretty similar, but better safe than sorry. :)