src/joystick/SDL_joystick.c
changeset 3369 71bb88152e3f
parent 2859 99210400e8b9
child 3608 a5a37f850d83
equal deleted inserted replaced
3368:ca6f355e44b2 3369:71bb88152e3f
   389     SDL_SYS_JoystickClose(joystick);
   389     SDL_SYS_JoystickClose(joystick);
   390 
   390 
   391     /* Remove joystick from list */
   391     /* Remove joystick from list */
   392     for (i = 0; SDL_joysticks[i]; ++i) {
   392     for (i = 0; SDL_joysticks[i]; ++i) {
   393         if (joystick == SDL_joysticks[i]) {
   393         if (joystick == SDL_joysticks[i]) {
   394             SDL_memcpy(&SDL_joysticks[i], &SDL_joysticks[i + 1],
   394             SDL_memmove(&SDL_joysticks[i], &SDL_joysticks[i + 1],
   395                        (SDL_numjoysticks - i) * sizeof(joystick));
   395                         (SDL_numjoysticks - i) * sizeof(joystick));
   396             break;
   396             break;
   397         }
   397         }
   398     }
   398     }
   399 
   399 
   400     /* Let the event thread keep running */
   400     /* Let the event thread keep running */