fix call to SDL_JoystickName() with SDL 1.2

SDL 1.2 :
const char *SDL_JoystickName(int index);

SDL 2.0 :
const char* SDL_JoystickName(SDL_Joystick* joystick);
This commit is contained in:
Thomas Bernard 2019-07-24 02:09:08 +02:00
parent 0cea439da9
commit 2892f0330f
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -785,7 +785,12 @@ int Init_program(int argc,char * argv[])
else
{
GFX2_Log(GFX2_DEBUG, "Joystick #0 open : \"%s\" %d axes, %d buttons, %d balls, %d hats\n",
SDL_JoystickName(Joystick), SDL_JoystickNumAxes(Joystick),
#if defined(USE_SDL2)
SDL_JoystickName(Joystick),
#else
SDL_JoystickName(0),
#endif
SDL_JoystickNumAxes(Joystick),
SDL_JoystickNumButtons(Joystick), SDL_JoystickNumBalls(Joystick),
SDL_JoystickNumHats(Joystick));
SDL_JoystickEventState(SDL_ENABLE);