Split controller axes into positive and negative sides so each can be bound independently.

Using this a D-Pad can be mapped to a thumbstick and vice versa.
Also added support for inverted axes, improving trigger binding support
This commit is contained in:
Sam Lantinga 2016-12-27 01:39:07 -08:00
parent 7c31636666
commit 6d7da0887d
7 changed files with 609 additions and 340 deletions

View file

@ -232,6 +232,8 @@ extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
*/
extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
#define SDL_JOYSTICK_AXIS_MAX 32767
#define SDL_JOYSTICK_AXIS_MIN -32768
/**
* Get the current state of an axis control on a joystick.
*