Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed broken envelopes.

  • Loading branch information
bobbens committed Jul 31, 2008
1 parent 8d7af52 commit 1a8f56fcad951aa15825f4f8ec2b39c41cb7a46e
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/haptic/darwin/SDL_syshaptic.c
@@ -655,7 +655,7 @@ SDL_SYS_ToFFEFFECT( SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src
}

/* 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 @@ SDL_SYS_ToFFEFFECT( SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src
}

/* 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 @@ SDL_SYS_ToFFEFFECT( SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src
}

/* 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 @@ SDL_SYS_ToFFEFFECT( SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src
}

/* 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;
}

0 comments on commit 1a8f56f

Please sign in to comment.