src/haptic/darwin/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2608 7c7a63f22afa
parent 2604 4eee4d565368
child 2609 eec0c81ede06
--- 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);