src/haptic/darwin/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2609 eec0c81ede06
parent 2608 7c7a63f22afa
child 2610 71a835ee438a
equal deleted inserted replaced
2608:7c7a63f22afa 2609:eec0c81ede06
   574          SDL_SetError("Haptic: Unknown direction type.");
   574          SDL_SetError("Haptic: Unknown direction type.");
   575          return -1;
   575          return -1;
   576    }
   576    }
   577 }
   577 }
   578 
   578 
   579 #define CONVERT(x)   (((x)*10000) / 0x7FFF)
   579 #define CONVERT(x)   (((x) > 0x7FFF) ? 10000 : ((x)*10000) / 0x7FFF)
   580 /*
   580 /*
   581  * Creates the FFEFFECT from a SDL_HapticEffect.
   581  * Creates the FFEFFECT from a SDL_HapticEffect.
   582  */
   582  */
   583 static int
   583 static int
   584 SDL_SYS_ToFFEFFECT( SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src )
   584 SDL_SYS_ToFFEFFECT( SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src )