Commit 22e0d6fa authored by Sam Lantinga's avatar Sam Lantinga

Closing the joystick removes it from the list.

parent 10823d60
...@@ -404,7 +404,7 @@ SDL_JoystickQuit(void) ...@@ -404,7 +404,7 @@ SDL_JoystickQuit(void)
SDL_numjoysticks = 0; SDL_numjoysticks = 0;
for (i = 0; i < numsticks; i++) { for (i = 0; i < numsticks; i++) {
SDL_Joystick *stick = SDL_joysticks[i]; SDL_Joystick *stick = SDL_joysticks[0];
if (stick && (stick->ref_count >= 1)) { if (stick && (stick->ref_count >= 1)) {
stick->ref_count = 1; stick->ref_count = 1;
SDL_JoystickClose(stick); SDL_JoystickClose(stick);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment