changeset 2652:380d926cc5a7 gsoc2008_force_feedback

Fix for mingw compilation of haptic subsystem by Alam.
author Edgar Simo <bobbens@gmail.com>
date Mon, 25 Aug 2008 17:30:39 +0000
parents ff33a65123ce
children 54b892b6abb5
files configure.in src/haptic/win32/SDL_syshaptic.c src/joystick/win32/SDL_dxjoystick.c src/joystick/win32/SDL_dxjoystick_c.h
diffstat 4 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Mon Aug 25 10:10:13 2008 +0000
+++ b/configure.in	Mon Aug 25 17:30:39 2008 +0000
@@ -2327,6 +2327,7 @@
             if test x$have_dinput = xyes; then
                 AC_DEFINE(SDL_JOYSTICK_DINPUT)
                 SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_dxjoystick.c"
+                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8 -lole32"
             else
                 AC_DEFINE(SDL_JOYSTICK_WINMM)
                 SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_mmjoystick.c"
--- a/src/haptic/win32/SDL_syshaptic.c	Mon Aug 25 10:10:13 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Mon Aug 25 17:30:39 2008 +0000
@@ -34,11 +34,11 @@
 
 #define DIRECTINPUT_VERSION 0x0700 /* Need at least DirectX 7 for dwStartDelay */
 #include <dinput.h>
-#include <dxerr.h>
+#include <dxerr8.h>
 #ifdef _MSC_VER
 #  pragma comment (lib, "dinput8.lib")
 #  pragma comment (lib, "dxguid.lib")
-#  pragma comment (lib, "dxerr.lib")
+#  pragma comment (lib, "dxerr8.lib")
 #endif /* _MSC_VER */
 
     /* an ISO hack for VisualC++ */
@@ -118,8 +118,8 @@
 DI_SetError(const char *str, HRESULT err)
 {
    SDL_SetError( "Haptic: %s - %s: %s", str,
-                 DXGetErrorString(err),
-                 DXGetErrorDescription(err));
+                 DXGetErrorString8A(err),
+                 DXGetErrorDescription8A(err));
 }
 
 
--- a/src/joystick/win32/SDL_dxjoystick.c	Mon Aug 25 10:10:13 2008 +0000
+++ b/src/joystick/win32/SDL_dxjoystick.c	Mon Aug 25 17:30:39 2008 +0000
@@ -85,7 +85,7 @@
 SetDIerror(const char *function, HRESULT code)
 {
     SDL_SetError("%s() [%s]: %s", function,
-                 DXGetErrorString(code), DXGetErrorDescription(code));
+                 DXGetErrorString8A(code), DXGetErrorDescription8A(code));
 }
 
 
--- a/src/joystick/win32/SDL_dxjoystick_c.h	Mon Aug 25 10:10:13 2008 +0000
+++ b/src/joystick/win32/SDL_dxjoystick_c.h	Mon Aug 25 17:30:39 2008 +0000
@@ -42,9 +42,9 @@
     /* Used for the c_dfDIJoystick2 symbol (no imports are used) */
 #   pragma comment (lib, "dinput.lib")
 #endif
-#include <dxerr.h>
+#include <dxerr8.h>
 #ifdef _MSC_VER
-#   pragma comment (lib, "dxerr.lib")
+#   pragma comment (lib, "dxerr8.lib")
 #endif