changeset 2567:d551e29f086b gsoc2008_force_feedback

Configure should try to use haptic on windows with directinput.
author Edgar Simo <bobbens@gmail.com>
date Thu, 31 Jul 2008 11:10:52 +0000
parents 94ff09afa478
children 5ad98a77bacb
files configure.in include/SDL_config.h.in include/SDL_config_win32.h
diffstat 3 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Thu Jul 31 11:06:16 2008 +0000
+++ b/configure.in	Thu Jul 31 11:10:52 2008 +0000
@@ -2331,6 +2331,13 @@
             fi
             have_joystick=yes
         fi
+        if test x$enable_haptic = xyes; then
+            if test x$have_dinput = xyes; then
+                AC_DEFINE(SDL_HAPTIC_DINPUT)
+                SOURCES="$SOURCES $srcdir/src/haptic/win32/SDL_syshaptic.c"
+                have_haptic=yes
+            fi
+        fi
         # Set up files for the cdrom library
         if test x$enable_cdrom = xyes; then
             AC_DEFINE(SDL_CDROM_WIN32)
--- a/include/SDL_config.h.in	Thu Jul 31 11:06:16 2008 +0000
+++ b/include/SDL_config.h.in	Thu Jul 31 11:10:52 2008 +0000
@@ -219,6 +219,7 @@
 #undef SDL_HAPTIC_DUMMY
 #undef SDL_HAPTIC_LINUX
 #undef SDL_HAPTIC_IOKIT
+#undef SDL_HAPTIC_DINPUT
 
 /* Enable various shared object loading systems */
 #undef SDL_LOADSO_BEOS
--- a/include/SDL_config_win32.h	Thu Jul 31 11:06:16 2008 +0000
+++ b/include/SDL_config_win32.h	Thu Jul 31 11:10:52 2008 +0000
@@ -141,8 +141,8 @@
 #define SDL_JOYSTICK_DISABLED   1
 #define SDL_HAPTIC_DUMMY	1
 #else
-#define SDL_JOYSTICK_WINMM	1
-#define SDL_HAPTIC_DUMMY	1
+#define SDL_JOYSTICK_DINPUT   1
+#define SDL_HAPTIC_DINPUT	1
 #endif
 
 /* Enable various shared object loading systems */