src/joystick/SDL_joystick.c
changeset 6098 c781fe3628a1
parent 6097 4ea2b4d4937a
child 6138 4c64952a58fb
equal deleted inserted replaced
6097:4ea2b4d4937a 6098:c781fe3628a1
   401     int i;
   401     int i;
   402 
   402 
   403     /* Stop the event polling */
   403     /* Stop the event polling */
   404     SDL_numjoysticks = 0;
   404     SDL_numjoysticks = 0;
   405 
   405 
   406     for (i = numjoysticks; i--; ) {
   406     for (i = numsticks; i--; ) {
   407         SDL_Joystick *stick = SDL_joysticks[i];
   407         SDL_Joystick *stick = SDL_joysticks[i];
   408         if (stick && (stick->ref_count >= 1)) {
   408         if (stick && (stick->ref_count >= 1)) {
   409             stick->ref_count = 1;
   409             stick->ref_count = 1;
   410             SDL_JoystickClose(stick);
   410             SDL_JoystickClose(stick);
   411         }
   411         }