diff 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
line wrap: on
line diff
--- 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;
          }