Almost got this compiling on Cygwin32, just needs DirectInput 7
authorSam Lantinga <slouken@libsdl.org>
Mon, 15 Sep 2008 08:41:03 +0000
changeset 2761 0c544c2eff77
parent 2760 02aa80d7905f
child 2762 90de10bc38ec
Almost got this compiling on Cygwin32, just needs DirectInput 7
src/haptic/win32/SDL_syshaptic.c
src/joystick/win32/SDL_dxjoystick.c
--- a/src/haptic/win32/SDL_syshaptic.c	Mon Sep 15 07:34:36 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Mon Sep 15 08:41:03 2008 +0000
@@ -154,7 +154,7 @@
     }
 
     ret = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER,
-                           &IID_IDirectInput, &dinput);
+                           &IID_IDirectInput, (LPVOID)&dinput);
     if (FAILED(ret)) {
         DI_SetError("CoCreateInstance", ret);
         return -1;
--- a/src/joystick/win32/SDL_dxjoystick.c	Mon Sep 15 07:34:36 2008 +0000
+++ b/src/joystick/win32/SDL_dxjoystick.c	Mon Sep 15 08:41:03 2008 +0000
@@ -41,6 +41,11 @@
 #include "SDL_dxjoystick_c.h"
 
 
+#ifndef DIDFT_OPTIONAL
+#define DIDFT_OPTIONAL		0x80000000
+#endif
+
+
 #define INPUT_QSIZE	32      /* Buffer up to 32 input messages */
 #define MAX_JOYSTICKS	8
 #define AXIS_MIN	-32768  /* minimum value for axis coordinate */
@@ -285,7 +290,7 @@
     }
 
     result = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER,
-                              &IID_IDirectInput, &dinput);
+                              &IID_IDirectInput, (LPVOID)&dinput);
 
     if (FAILED(result)) {
         SetDIerror("CoCreateInstance", result);