Fixed broken envelopes. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Thu, 31 Jul 2008 10:31:31 +0000
branchgsoc2008_force_feedback
changeset 2565698c776c642f
parent 2564 c9348710a98a
child 2566 94ff09afa478
Fixed broken envelopes.
src/haptic/darwin/SDL_syshaptic.c
     1.1 --- a/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 10:26:21 2008 +0000
     1.2 +++ b/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 10:31:31 2008 +0000
     1.3 @@ -655,7 +655,7 @@
     1.4           }
     1.5           
     1.6           /* Envelope */
     1.7 -         if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) {
     1.8 +         if ((hap_constant->attack_length==0) && (hap_constant->fade_length==0)) {
     1.9              SDL_free(envelope);
    1.10              dest->lpEnvelope = NULL;
    1.11           }
    1.12 @@ -701,7 +701,7 @@
    1.13           }
    1.14           
    1.15           /* Envelope */
    1.16 -         if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) {
    1.17 +         if ((hap_periodic->attack_length==0) && (hap_periodic->fade_length==0)) {
    1.18              SDL_free(envelope);
    1.19              dest->lpEnvelope = NULL;
    1.20           }
    1.21 @@ -788,7 +788,7 @@
    1.22           }
    1.23  
    1.24           /* Envelope */
    1.25 -         if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) {
    1.26 +         if ((hap_ramp->attack_length==0) && (hap_ramp->fade_length==0)) {
    1.27              SDL_free(envelope);
    1.28              dest->lpEnvelope = NULL;
    1.29           }
    1.30 @@ -833,7 +833,7 @@
    1.31           }
    1.32           
    1.33           /* Envelope */
    1.34 -         if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) {
    1.35 +         if ((hap_custom->attack_length==0) && (hap_custom->fade_length==0)) {
    1.36              SDL_free(envelope);
    1.37              dest->lpEnvelope = NULL;
    1.38           }