Mercurial > sdl-ios-xcode
comparison src/haptic/darwin/SDL_syshaptic.c @ 2565:698c776c642f gsoc2008_force_feedback
Fixed broken envelopes.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Thu, 31 Jul 2008 10:31:31 +0000 |
parents | c9348710a98a |
children | a84ce5ae8936 |
comparison
equal
deleted
inserted
replaced
2564:c9348710a98a | 2565:698c776c642f |
---|---|
653 if (SDL_SYS_SetDirection(dest, &hap_constant->direction, dest->cAxes) < 0) { | 653 if (SDL_SYS_SetDirection(dest, &hap_constant->direction, dest->cAxes) < 0) { |
654 return -1; | 654 return -1; |
655 } | 655 } |
656 | 656 |
657 /* Envelope */ | 657 /* Envelope */ |
658 if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) { | 658 if ((hap_constant->attack_length==0) && (hap_constant->fade_length==0)) { |
659 SDL_free(envelope); | 659 SDL_free(envelope); |
660 dest->lpEnvelope = NULL; | 660 dest->lpEnvelope = NULL; |
661 } | 661 } |
662 else { | 662 else { |
663 envelope->dwAttackLevel = CONVERT(hap_constant->attack_level); | 663 envelope->dwAttackLevel = CONVERT(hap_constant->attack_level); |
699 if (SDL_SYS_SetDirection(dest, &hap_periodic->direction, dest->cAxes) < 0) { | 699 if (SDL_SYS_SetDirection(dest, &hap_periodic->direction, dest->cAxes) < 0) { |
700 return -1; | 700 return -1; |
701 } | 701 } |
702 | 702 |
703 /* Envelope */ | 703 /* Envelope */ |
704 if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) { | 704 if ((hap_periodic->attack_length==0) && (hap_periodic->fade_length==0)) { |
705 SDL_free(envelope); | 705 SDL_free(envelope); |
706 dest->lpEnvelope = NULL; | 706 dest->lpEnvelope = NULL; |
707 } | 707 } |
708 else { | 708 else { |
709 envelope->dwAttackLevel = CONVERT(hap_periodic->attack_level); | 709 envelope->dwAttackLevel = CONVERT(hap_periodic->attack_level); |
786 if (SDL_SYS_SetDirection(dest, &hap_ramp->direction, dest->cAxes) < 0) { | 786 if (SDL_SYS_SetDirection(dest, &hap_ramp->direction, dest->cAxes) < 0) { |
787 return -1; | 787 return -1; |
788 } | 788 } |
789 | 789 |
790 /* Envelope */ | 790 /* Envelope */ |
791 if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) { | 791 if ((hap_ramp->attack_length==0) && (hap_ramp->fade_length==0)) { |
792 SDL_free(envelope); | 792 SDL_free(envelope); |
793 dest->lpEnvelope = NULL; | 793 dest->lpEnvelope = NULL; |
794 } | 794 } |
795 else { | 795 else { |
796 envelope->dwAttackLevel = CONVERT(hap_ramp->attack_level); | 796 envelope->dwAttackLevel = CONVERT(hap_ramp->attack_level); |
831 if (SDL_SYS_SetDirection(dest, &hap_custom->direction, dest->cAxes) < 0) { | 831 if (SDL_SYS_SetDirection(dest, &hap_custom->direction, dest->cAxes) < 0) { |
832 return -1; | 832 return -1; |
833 } | 833 } |
834 | 834 |
835 /* Envelope */ | 835 /* Envelope */ |
836 if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) { | 836 if ((hap_custom->attack_length==0) && (hap_custom->fade_length==0)) { |
837 SDL_free(envelope); | 837 SDL_free(envelope); |
838 dest->lpEnvelope = NULL; | 838 dest->lpEnvelope = NULL; |
839 } | 839 } |
840 else { | 840 else { |
841 envelope->dwAttackLevel = CONVERT(hap_custom->attack_level); | 841 envelope->dwAttackLevel = CONVERT(hap_custom->attack_level); |