From 77b2651f5403fe3d2e1e4b3939385f64398025a6 Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Tue, 5 Aug 2008 15:56:35 +0000 Subject: [PATCH] Fixed mistake in CONVERT. --- src/haptic/darwin/SDL_syshaptic.c | 2 +- src/haptic/win32/SDL_syshaptic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/haptic/darwin/SDL_syshaptic.c b/src/haptic/darwin/SDL_syshaptic.c index 161c1bf78..7a56fdfe0 100644 --- a/src/haptic/darwin/SDL_syshaptic.c +++ b/src/haptic/darwin/SDL_syshaptic.c @@ -571,7 +571,7 @@ SDL_SYS_SetDirection( FFEFFECT * effect, SDL_HapticDirection *dir, int naxes ) } } -#define CONVERT(x) (((x)*10000) / 0xFFFF ) +#define CONVERT(x) (((x)*10000) / 0x7FFF) /* * Creates the FFEFFECT from a SDL_HapticEffect. */ diff --git a/src/haptic/win32/SDL_syshaptic.c b/src/haptic/win32/SDL_syshaptic.c index 68c7231d0..bc62d215c 100644 --- a/src/haptic/win32/SDL_syshaptic.c +++ b/src/haptic/win32/SDL_syshaptic.c @@ -584,7 +584,7 @@ SDL_SYS_SetDirection( DIEFFECT * effect, SDL_HapticDirection *dir, int naxes ) } } -#define CONVERT(x) (((x)*10000) / 0xFFFF ) +#define CONVERT(x) (((x)*10000) / 0x7FFF) /* * Creates the DIEFFECT from a SDL_HapticEffect. */