comparison src/haptic/SDL_haptic.c @ 2523:366d84fdf8d1 gsoc2008_force_feedback

Haptic subsystem handles haptic axes now. Support for SDL_HAPTIC_SPHERICAL on linux. More error checking. Improved documentation. Added missing SDLCALLs to SDL_haptic.h.
author Edgar Simo <bobbens@gmail.com>
date Thu, 17 Jul 2008 11:47:48 +0000
parents af9df9662807
children 1a55848ce198
comparison
equal deleted inserted replaced
2522:0877146be013 2523:366d84fdf8d1
382 } 382 }
383 383
384 return haptic->supported; 384 return haptic->supported;
385 } 385 }
386 386
387
388 /*
389 * Returns the number of axis on the device.
390 */
391 int
392 SDL_HapticNumAxes(SDL_Haptic * haptic)
393 {
394 if (!ValidHaptic(&haptic)) {
395 return -1;
396 }
397
398 return haptic->naxes;
399 }
400
387 /* 401 /*
388 * Checks to see if the device can support the effect. 402 * Checks to see if the device can support the effect.
389 */ 403 */
390 int 404 int
391 SDL_HapticEffectSupported(SDL_Haptic * haptic, SDL_HapticEffect * effect) 405 SDL_HapticEffectSupported(SDL_Haptic * haptic, SDL_HapticEffect * effect)