Mercurial > sdl-ios-xcode
diff src/haptic/darwin/SDL_syshaptic.c @ 2608:7c7a63f22afa gsoc2008_force_feedback
Using same syntax as the windows port for updating effects.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Tue, 05 Aug 2008 18:01:09 +0000 |
parents | 4eee4d565368 |
children | eec0c81ede06 |
line wrap: on
line diff
--- a/src/haptic/darwin/SDL_syshaptic.c Tue Aug 05 16:48:53 2008 +0000 +++ b/src/haptic/darwin/SDL_syshaptic.c Tue Aug 05 18:01:09 2008 +0000 @@ -83,6 +83,7 @@ switch (err) { case FFERR_DEVICEFULL: return "device full"; + /* This should be valid, but for some reason isn't defined... */ /*case FFERR_DEVICENOTREG: return "device not registered";*/ case FFERR_DEVICEPAUSED: @@ -269,7 +270,7 @@ #define FF_TEST(ff, s) \ -if (features.supportedEffects & ff) supported |= s +if (features.supportedEffects & (ff)) supported |= (s) /* * Gets supported features. */ @@ -1011,7 +1012,13 @@ /* Set the flags. Might be worthwhile to diff temp with loaded effect and * only change those parameters. */ - flags = FFEP_ALLPARAMS; + flags = FFEP_DIRECTION | + FFEP_DURATION | + FFEP_ENVELOPE | + FFEP_STARTDELAY | + FFEP_TRIGGERBUTTON | + FFEP_TRIGGERREPEATINTERVAL | + FFEP_TYPESPECIFICPARAMS; /* Create the actual effect. */ ret = FFEffectSetParameters(effect->hweffect->ref, &temp, flags);