comparison src/haptic/linux/SDL_syshaptic.c @ 2495:66c02abeef0e gsoc2008_force_feedback

Added SDL_HapticGetEffectStatus(). More comments.
author Edgar Simo <bobbens@gmail.com>
date Thu, 03 Jul 2008 09:58:27 +0000
parents 6a2482d4af81
children 8f840a6cdf01
comparison
equal deleted inserted replaced
2494:a72a5f62d6b7 2495:66c02abeef0e
610 effect->hweffect = NULL; 610 effect->hweffect = NULL;
611 } 611 }
612 612
613 613
614 /* 614 /*
615 * Gets the status of a haptic effect.
616 */
617 int
618 SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect * effect)
619 {
620 #if 0 /* Not supported atm. */
621 struct input_event ie;
622
623 ie.type = EV_FF;
624 ie.type = EV_FF_STATUS;
625 ie.code = effect->hweffect->effect.id;
626
627 if (write(haptic->hwdata->fd, &ie, sizeof(ie)) < 0) {
628 SDL_SetError("Error getting haptic device status.");
629 return -1;
630 }
631
632 return 0;
633 #endif
634
635 return -1;
636 }
637
638
639 /*
615 * Sets the gain. 640 * Sets the gain.
616 */ 641 */
617 int 642 int
618 SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) 643 SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
619 { 644 {