comparison src/haptic/SDL_haptic.c @ 2491:10bc7aaf5114 gsoc2008_force_feedback

Commented SDL_syshaptic.h. Removed SDL_haptic_c.h (no private functions). Fixed bug with SDL_HapticFromJoystick().
author Edgar Simo <bobbens@gmail.com>
date Wed, 02 Jul 2008 10:26:35 +0000
parents be9b206d44af
children 66c02abeef0e
comparison
equal deleted inserted replaced
2490:be9b206d44af 2491:10bc7aaf5114
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 #include "SDL_config.h" 22 #include "SDL_config.h"
23 23
24 #include "SDL_haptic_c.h"
25 #include "SDL_syshaptic.h" 24 #include "SDL_syshaptic.h"
26 #include "../joystick/SDL_joystick_c.h" /* For SDL_PrivateJoystickValid */ 25 #include "../joystick/SDL_joystick_c.h" /* For SDL_PrivateJoystickValid */
27 26
28 27
29 static Uint8 SDL_numhaptics = 0; 28 static Uint8 SDL_numhaptics = 0;
171 return NULL; 170 return NULL;
172 } 171 }
173 172
174 /* Check to see if joystick's haptic is already open */ 173 /* Check to see if joystick's haptic is already open */
175 for (i=0; SDL_haptics[i]; i++) { 174 for (i=0; SDL_haptics[i]; i++) {
176 if (SDL_SYS_JoystickSameHaptic(&SDL_haptics[i],joystick)) { 175 if (SDL_SYS_JoystickSameHaptic(SDL_haptics[i],joystick)) {
177 haptic = SDL_haptics[i]; 176 haptic = SDL_haptics[i];
178 ++haptic->ref_count; 177 ++haptic->ref_count;
179 return haptic; 178 return haptic;
180 } 179 }
181 } 180 }