src/haptic/win32/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2609 eec0c81ede06
parent 2607 e0ca521516f6
child 2611 cdea9a70dade
--- a/src/haptic/win32/SDL_syshaptic.c	Tue Aug 05 18:01:09 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Tue Aug 05 18:26:11 2008 +0000
@@ -575,7 +575,7 @@
    }
 }
 
-#define CONVERT(x)   (((x)*10000) / 0x7FFF)
+#define CONVERT(x)   (((x) > 0x7FFF) ? 10000 : ((x)*10000) / 0x7FFF)
 /*
  * Creates the DIEFFECT from a SDL_HapticEffect.
  */