Mercurial > sdl-ios-xcode
comparison src/haptic/darwin/SDL_syshaptic.c @ 2552:ee048e7bc909 gsoc2008_force_feedback
Removed invalid type check.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Wed, 30 Jul 2008 14:08:21 +0000 |
parents | b5b8a7f4a965 |
children | 3f853f075bc0 |
comparison
equal
deleted
inserted
replaced
2551:f010e1d4e431 | 2552:ee048e7bc909 |
---|---|
853 | 853 |
854 /* | 854 /* |
855 * Gets the effect type from the generic SDL haptic effect wrapper. | 855 * Gets the effect type from the generic SDL haptic effect wrapper. |
856 */ | 856 */ |
857 CFUUIDRef | 857 CFUUIDRef |
858 SDL_SYS_HapticEffectType(struct haptic_effect * effect) | 858 SDL_SYS_HapticEffectType( Uint16 type ) |
859 { | 859 { |
860 switch (effect->effect.type) { | 860 switch (type) { |
861 case SDL_HAPTIC_CONSTANT: | 861 case SDL_HAPTIC_CONSTANT: |
862 return kFFEffectType_ConstantForce_ID; | 862 return kFFEffectType_ConstantForce_ID; |
863 | 863 |
864 case SDL_HAPTIC_RAMP: | 864 case SDL_HAPTIC_RAMP: |
865 return kFFEffectType_RampForce_ID; | 865 return kFFEffectType_RampForce_ID; |
918 SDL_OutOfMemory(); | 918 SDL_OutOfMemory(); |
919 goto err_hweffect; | 919 goto err_hweffect; |
920 } | 920 } |
921 | 921 |
922 /* Get the type. */ | 922 /* Get the type. */ |
923 type = SDL_SYS_HapticEffectType(effect); | 923 type = SDL_SYS_HapticEffectType(effect->type); |
924 if (type == NULL) { | 924 if (type == NULL) { |
925 goto err_hweffect; | 925 goto err_hweffect; |
926 } | 926 } |
927 | 927 |
928 /* Get the effect. */ | 928 /* Get the effect. */ |