Mercurial > sdl-ios-xcode
comparison src/joystick/SDL_joystick.c @ 3369:71bb88152e3f
Debian patch: 218_joystick_memmove.diff
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 10 Oct 2009 10:02:17 +0000 |
parents | 99210400e8b9 |
children | a5a37f850d83 |
comparison
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 */ |