Fixed compile errors building with mingw64
authorSam Lantinga <slouken@libsdl.org>
Sun, 26 May 2013 11:34:04 -0700
changeset 7223 76fa20889de8
parent 7222 2435b221d77d
child 7224 a86520fe8d79
Fixed compile errors building with mingw64
src/joystick/windows/SDL_dxjoystick.c
--- a/src/joystick/windows/SDL_dxjoystick.c	Sun May 26 11:06:17 2013 -0700
+++ b/src/joystick/windows/SDL_dxjoystick.c	Sun May 26 11:34:04 2013 -0700
@@ -373,7 +373,9 @@
 
 
 DEFINE_GUID(CLSID_WbemLocator,   0x4590f811,0x1d3a,0x11d0,0x89,0x1F,0x00,0xaa,0x00,0x4b,0x2e,0x24);
+#ifndef __IWbemLocator_INTERFACE_DEFINED__
 DEFINE_GUID(IID_IWbemLocator,    0xdc12a687,0x737f,0x11cf,0x88,0x4d,0x00,0xaa,0x00,0x4b,0x2e,0x24);
+#endif
 
 /*-----------------------------------------------------------------------------
  *
@@ -546,7 +548,6 @@
 static int
 SDL_JoystickThread(void *_data)
 {
-    HRESULT result = S_OK;
     HWND messageWindow = 0;
     HDEVNOTIFY hNotify = 0;
     DEV_BROADCAST_DEVICEINTERFACE dbh;
@@ -555,7 +556,7 @@
 
     SDL_memset( bOpenedXInputDevices, 0x0, sizeof(bOpenedXInputDevices) );
 
-    result = WIN_CoInitialize();
+    WIN_CoInitialize();
 
     SDL_memset( &wincl, 0x0, sizeof(wincl) );
     wincl.hInstance = GetModuleHandle( NULL );
@@ -813,7 +814,6 @@
 /* detect any new joysticks being inserted into the system */
 void SDL_SYS_JoystickDetect()
 {
-    HRESULT result;
     JoyStick_DeviceData *pCurList = NULL;
     /* only enum the devices if the joystick thread told us something changed */
     if ( s_bDeviceAdded || s_bDeviceRemoved )
@@ -832,7 +832,7 @@
         SDL_memset( s_pKnownJoystickGUIDs, 0x0, sizeof(GUID)*MAX_JOYSTICKS );
 
         /* Look for joysticks, wheels, head trackers, gamepads, etc.. */
-        result = IDirectInput8_EnumDevices(dinput,
+        IDirectInput8_EnumDevices(dinput,
             DI8DEVCLASS_GAMECTRL,
             EnumJoysticksCallback,
             &pCurList, DIEDFL_ATTACHEDONLY);