From 1dc86eeece7e1b9a36e5c71614ce21c01b094dec Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 29 Nov 2011 02:15:39 -0500 Subject: [PATCH] Closing the joystick removes it from the list. --- src/joystick/SDL_joystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 401036dab..5a4f38c15 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -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);