From 8e7c775c1cdbf167f288de492052842fb4a6f613 Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Thu, 31 Jul 2008 11:10:52 +0000 Subject: [PATCH] Configure should try to use haptic on windows with directinput. --- configure.in | 7 +++++++ include/SDL_config.h.in | 1 + include/SDL_config_win32.h | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index f36d9157c..467d058f8 100644 --- a/configure.in +++ b/configure.in @@ -2331,6 +2331,13 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau 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) diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in index ce05143e2..648c9a7dc 100644 --- a/include/SDL_config.h.in +++ b/include/SDL_config.h.in @@ -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 diff --git a/include/SDL_config_win32.h b/include/SDL_config_win32.h index 78bac143f..840f84dba 100644 --- a/include/SDL_config_win32.h +++ b/include/SDL_config_win32.h @@ -141,8 +141,8 @@ typedef unsigned int uintptr_t; #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 */