Fixed broken envelopes. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Thu, 31 Jul 2008 10:31:31 +0000
branchgsoc2008_force_feedback
changeset 2565 698c776c642f
parent 2564 c9348710a98a
child 2566 94ff09afa478
Fixed broken envelopes.
src/haptic/darwin/SDL_syshaptic.c
--- a/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 10:26:21 2008 +0000
+++ b/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 10:31:31 2008 +0000
@@ -655,7 +655,7 @@
          }
          
          /* Envelope */
-         if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) {
+         if ((hap_constant->attack_length==0) && (hap_constant->fade_length==0)) {
             SDL_free(envelope);
             dest->lpEnvelope = NULL;
          }
@@ -701,7 +701,7 @@
          }
          
          /* Envelope */
-         if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) {
+         if ((hap_periodic->attack_length==0) && (hap_periodic->fade_length==0)) {
             SDL_free(envelope);
             dest->lpEnvelope = NULL;
          }
@@ -788,7 +788,7 @@
          }
 
          /* Envelope */
-         if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) {
+         if ((hap_ramp->attack_length==0) && (hap_ramp->fade_length==0)) {
             SDL_free(envelope);
             dest->lpEnvelope = NULL;
          }
@@ -833,7 +833,7 @@
          }
          
          /* Envelope */
-         if ((envelope->dwAttackTime == 0) && (envelope->dwFadeTime == 0)) {
+         if ((hap_custom->attack_length==0) && (hap_custom->fade_length==0)) {
             SDL_free(envelope);
             dest->lpEnvelope = NULL;
          }