diff --git a/src/haptic/win32/SDL_syshaptic.c b/src/haptic/win32/SDL_syshaptic.c index 557c28fc9..e7f5fba21 100644 --- a/src/haptic/win32/SDL_syshaptic.c +++ b/src/haptic/win32/SDL_syshaptic.c @@ -154,7 +154,7 @@ SDL_SYS_HapticInit(void) } ret = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectInput, &dinput); + &IID_IDirectInput, (LPVOID)&dinput); if (FAILED(ret)) { DI_SetError("CoCreateInstance", ret); return -1; diff --git a/src/joystick/win32/SDL_dxjoystick.c b/src/joystick/win32/SDL_dxjoystick.c index b98426255..ac7d2f1e8 100644 --- a/src/joystick/win32/SDL_dxjoystick.c +++ b/src/joystick/win32/SDL_dxjoystick.c @@ -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 @@ SDL_SYS_JoystickInit(void) } result = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectInput, &dinput); + &IID_IDirectInput, (LPVOID)&dinput); if (FAILED(result)) { SetDIerror("CoCreateInstance", result);