Source/ThirdParty/SDL/src/joystick/SDL_gamecontroller.c
/*
 * Find the SDL_GameController that owns this instance id
 */
Find the SDL_GameController that owns this instance id
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;
}
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 ; }
Find the SDL_GameController that owns this instance id
Find the SDL_GameController that owns this instance id