Closing the joystick removes it from the list.

This commit is contained in:
Sam Lantinga 2011-11-29 02:15:39 -05:00
parent 10823d6065
commit 22e0d6fa53

View file

@ -404,7 +404,7 @@ SDL_JoystickQuit(void)
SDL_numjoysticks = 0;
for (i = 0; i < numsticks; i++) {
SDL_Joystick *stick = SDL_joysticks[i];
SDL_Joystick *stick = SDL_joysticks[0];
if (stick && (stick->ref_count >= 1)) {
stick->ref_count = 1;
SDL_JoystickClose(stick);