What is the relationship between SDL_Joystick and SDL_GameController? These are the only things I know of right now:
SDL_GameControllerand related functions are all part of a new API introduced in SDL2.SDL_GameControllerand related functions are built on top of the existingSDL_JoystickAPI.- (Working Draft) You can obtain an instance of
SDL_Joystickby calling on the functionSDL_GameControllerGetJoystick()and passing in an instance ofSDL_GameController. - (Working Draft) You can obtain an instance of
SDL_GameControllerfirst by calling onSDL_JoystickInstanceID()and passing in an instance ofSDL_Joystick, then pass in theSDL_JoystickIDtoSDL_GameControllerFromInstanceID.
Even though SDL_Joystick and SDL_GameController are both interchangeable, it seems like SDL_GameController is here to replace and slowly succeed the SDL_Joystick.
Reason is, when polling for SDL_Event, the SDL_Event instance contains both the SDL_Event::jbutton and SDL_Event::cbutton structs, representing the SDL_Joystick buttons and SDL_GameController buttons, respectively. I guess I can use either one, or both, button events for the player controls.
I could be wrong here.
I would like to ask:

