Removed invalid type check. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Wed, 30 Jul 2008 14:08:21 +0000
branchgsoc2008_force_feedback
changeset 2552 ee048e7bc909
parent 2551 f010e1d4e431
child 2553 3f853f075bc0
Removed invalid type check.
src/haptic/darwin/SDL_syshaptic.c
--- a/src/haptic/darwin/SDL_syshaptic.c	Wed Jul 30 11:54:08 2008 +0000
+++ b/src/haptic/darwin/SDL_syshaptic.c	Wed Jul 30 14:08:21 2008 +0000
@@ -855,9 +855,9 @@
  * 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 @@
    }
 
    /* Get the type. */
-   type = SDL_SYS_HapticEffectType(effect);
+   type = SDL_SYS_HapticEffectType(effect->type);
    if (type == NULL) {
       goto err_hweffect;
    }