Uint32windowID;/**< The window with mouse focus, if any */
Uint32which;/**< The mouse instance id, or SDL_TOUCH_MOUSEID */
Sint32x;/**< The amount scrolled horizontally, positive to the right and negative to the left */
Sint32y;/**< The amount scrolled vertically, positive away from the user and negative toward the user */
Uint32direction;/**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
Uint32type;/**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
Uint32timestamp;
Uint32which;/**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
Uint8iscapture;/**< zero if an output device, non-zero if a capture device. */
* Get the SDL joystick layer binding for this controller button/axis mapping
*/
typedefstructSDL_GameControllerButtonBind
{
SDL_GameControllerBindTypebindType;
union
{
intbutton;
intaxis;
struct{
inthat;
inthat_mask;
}hat;
}value;
}SDL_GameControllerButtonBind;
/**
* To count the number of game controllers in the system for the following:
* int nJoysticks = SDL_NumJoysticks();
* int nGameControllers = 0;
* for ( int i = 0; i < nJoysticks; i++ ) {
* if ( SDL_IsGameController(i) ) {
* nGameControllers++;
* }
* }
*
* 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:
* guid,name,mappings
*
* 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.
* Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
* The mapping format for joystick is:
* bX - a joystick button, index X
* hX.Y - hat X with value Y
* aX - axis X of the joystick
* Buttons can be used as a controller axis and vice versa.
*
* This string shows an example of a valid mapping for a controller