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