Fix for mingw compilation of haptic subsystem by Alam.
1.1 --- a/configure.in Mon Aug 25 10:10:13 2008 +0000
1.2 +++ b/configure.in Mon Aug 25 17:30:39 2008 +0000
1.3 @@ -2327,6 +2327,7 @@
1.4 if test x$have_dinput = xyes; then
1.5 AC_DEFINE(SDL_JOYSTICK_DINPUT)
1.6 SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_dxjoystick.c"
1.7 + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8 -lole32"
1.8 else
1.9 AC_DEFINE(SDL_JOYSTICK_WINMM)
1.10 SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_mmjoystick.c"
2.1 --- a/src/haptic/win32/SDL_syshaptic.c Mon Aug 25 10:10:13 2008 +0000
2.2 +++ b/src/haptic/win32/SDL_syshaptic.c Mon Aug 25 17:30:39 2008 +0000
2.3 @@ -34,11 +34,11 @@
2.4
2.5 #define DIRECTINPUT_VERSION 0x0700 /* Need at least DirectX 7 for dwStartDelay */
2.6 #include <dinput.h>
2.7 -#include <dxerr.h>
2.8 +#include <dxerr8.h>
2.9 #ifdef _MSC_VER
2.10 # pragma comment (lib, "dinput8.lib")
2.11 # pragma comment (lib, "dxguid.lib")
2.12 -# pragma comment (lib, "dxerr.lib")
2.13 +# pragma comment (lib, "dxerr8.lib")
2.14 #endif /* _MSC_VER */
2.15
2.16 /* an ISO hack for VisualC++ */
2.17 @@ -118,8 +118,8 @@
2.18 DI_SetError(const char *str, HRESULT err)
2.19 {
2.20 SDL_SetError( "Haptic: %s - %s: %s", str,
2.21 - DXGetErrorString(err),
2.22 - DXGetErrorDescription(err));
2.23 + DXGetErrorString8A(err),
2.24 + DXGetErrorDescription8A(err));
2.25 }
2.26
2.27
3.1 --- a/src/joystick/win32/SDL_dxjoystick.c Mon Aug 25 10:10:13 2008 +0000
3.2 +++ b/src/joystick/win32/SDL_dxjoystick.c Mon Aug 25 17:30:39 2008 +0000
3.3 @@ -85,7 +85,7 @@
3.4 SetDIerror(const char *function, HRESULT code)
3.5 {
3.6 SDL_SetError("%s() [%s]: %s", function,
3.7 - DXGetErrorString(code), DXGetErrorDescription(code));
3.8 + DXGetErrorString8A(code), DXGetErrorDescription8A(code));
3.9 }
3.10
3.11
4.1 --- a/src/joystick/win32/SDL_dxjoystick_c.h Mon Aug 25 10:10:13 2008 +0000
4.2 +++ b/src/joystick/win32/SDL_dxjoystick_c.h Mon Aug 25 17:30:39 2008 +0000
4.3 @@ -42,9 +42,9 @@
4.4 /* Used for the c_dfDIJoystick2 symbol (no imports are used) */
4.5 # pragma comment (lib, "dinput.lib")
4.6 #endif
4.7 -#include <dxerr.h>
4.8 +#include <dxerr8.h>
4.9 #ifdef _MSC_VER
4.10 -# pragma comment (lib, "dxerr.lib")
4.11 +# pragma comment (lib, "dxerr8.lib")
4.12 #endif
4.13
4.14