Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed broken envelopes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Jul 31, 2008
1 parent 8d7af52 commit 1a8f56f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/haptic/darwin/SDL_syshaptic.c
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1a8f56f

Please sign in to comment.