Update SDL2 to the latest hg revision of 2.0.4.

This commit is contained in:
Alex Szpakowski
2015-12-01 18:02:23 -04:00
parent 4206243c74
commit 3de7c6c2c9
124 changed files with 4371 additions and 1065 deletions
@@ -1046,6 +1046,25 @@ SDL_Joystick *SDL_GameControllerGetJoystick(SDL_GameController * gamecontroller)
return gamecontroller->joystick;
}
/*
* Find the SDL_GameController that owns this instance id
*/
SDL_GameController *
SDL_GameControllerFromInstanceID(SDL_JoystickID joyid)
{
SDL_GameController *gamecontroller = SDL_gamecontrollers;
while (gamecontroller) {
if (gamecontroller->joystick->instance_id == joyid) {
return gamecontroller;
}
gamecontroller = gamecontroller->next;
}
return NULL;
}
/**
* Get the SDL joystick layer binding for this controller axis mapping
*/