From c5277727323d1612d55e7489111b47d1bd2eec11 Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Wed, 30 Jul 2008 14:08:21 +0000 Subject: [PATCH] Removed invalid type check. --- src/haptic/darwin/SDL_syshaptic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/haptic/darwin/SDL_syshaptic.c b/src/haptic/darwin/SDL_syshaptic.c index c7fc556f5..d1713188f 100644 --- a/src/haptic/darwin/SDL_syshaptic.c +++ b/src/haptic/darwin/SDL_syshaptic.c @@ -855,9 +855,9 @@ SDL_SYS_HapticFreeFFEFFECT( FFEFFECT * effect, int type ) * Gets the effect type from the generic SDL haptic effect wrapper. */ CFUUIDRef -SDL_SYS_HapticEffectType(struct haptic_effect * effect) +SDL_SYS_HapticEffectType( Uint16 type ) { - switch (effect->effect.type) { + switch (type) { case SDL_HAPTIC_CONSTANT: return kFFEffectType_ConstantForce_ID; @@ -920,7 +920,7 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect * effect, } /* Get the type. */ - type = SDL_SYS_HapticEffectType(effect); + type = SDL_SYS_HapticEffectType(effect->type); if (type == NULL) { goto err_hweffect; }