ref: fb9eae0caa7ce60bed6cd101c87856740a338c95
parent: defe24a7230f4ffb8f1d1ca8fc166db73ef8e9d5
author: Simon Howard <[email protected]>
date: Fri Dec 5 23:55:14 EST 2014
setup: Fix call to SDL_JoystickName(). SDL_JoystickName() in SDL2 takes a joystick handle rather than an index. Change calls to this function to match the new API.
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -367,7 +367,7 @@
int i;
joystick = all_joysticks[index];
- name = SDL_JoystickName(index);
+ name = SDL_JoystickName(joystick);
axes = SDL_JoystickNumAxes(joystick);
buttons = SDL_JoystickNumButtons(joystick);
hats = SDL_JoystickNumHats(joystick);
@@ -494,7 +494,7 @@
if (joystick_initted
&& joystick_index >= 0 && joystick_index < SDL_NumJoysticks())
{
- name = (char *) SDL_JoystickName(joystick_index);
+ name = (char *) SDL_JoystickNameForIndex(joystick_index);
}
TXT_SetButtonLabel(joystick_button, name);