Mercurial > sdl-ios-xcode
comparison src/haptic/SDL_haptic.c @ 2561:3696b9ce8a37 gsoc2008_force_feedback
Correctness patch, it's up to the SDL_haptic.c to clean up effects, not SDL_syshaptic.c.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Thu, 31 Jul 2008 09:45:27 +0000 |
parents | 2274406ba792 |
children | 269ba4f28d0e |
comparison
equal
deleted
inserted
replaced
2560:2274406ba792 | 2561:3696b9ce8a37 |
---|---|
320 SDL_SYS_HapticClose(haptic); | 320 SDL_SYS_HapticClose(haptic); |
321 | 321 |
322 /* Remove from the list */ | 322 /* Remove from the list */ |
323 for (i = 0; SDL_haptics[i]; ++i) { | 323 for (i = 0; SDL_haptics[i]; ++i) { |
324 if (haptic == SDL_haptics[i]) { | 324 if (haptic == SDL_haptics[i]) { |
325 SDL_haptics[i] = NULL; | |
325 SDL_memcpy(&SDL_haptics[i], &SDL_haptics[i + 1], | 326 SDL_memcpy(&SDL_haptics[i], &SDL_haptics[i + 1], |
326 (SDL_numhaptics - i) * sizeof(haptic)); | 327 (SDL_numhaptics - i) * sizeof(haptic)); |
327 break; | 328 break; |
328 } | 329 } |
329 } | 330 } |