89 * To count the number of game controllers in the system for the following:
90 * int nJoysticks = SDL_NumJoysticks();
91 * int nGameControllers = 0;
92 * for (int i = 0; i < nJoysticks; i++) {
93 * if (SDL_IsGameController(i)) {
94 * nGameControllers++;
95 * }
96 * }
97 *
98 * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
99 * guid,name,mappings
100 *
101 * Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
102 * Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
103 * The mapping format for joystick is:
104 * bX - a joystick button, index X
105 * hX.Y - hat X with value Y
106 * aX - axis X of the joystick
107 * Buttons can be used as a controller axis and vice versa.
108 *
109 * This string shows an example of a valid mapping for a controller