src/joystick/windows/SDL_dxjoystick.c
changeset 7223 76fa20889de8
parent 7191 75360622e65f
child 7230 757e9812ef1c
     1.1 --- a/src/joystick/windows/SDL_dxjoystick.c	Sun May 26 11:06:17 2013 -0700
     1.2 +++ b/src/joystick/windows/SDL_dxjoystick.c	Sun May 26 11:34:04 2013 -0700
     1.3 @@ -373,7 +373,9 @@
     1.4  
     1.5  
     1.6  DEFINE_GUID(CLSID_WbemLocator,   0x4590f811,0x1d3a,0x11d0,0x89,0x1F,0x00,0xaa,0x00,0x4b,0x2e,0x24);
     1.7 +#ifndef __IWbemLocator_INTERFACE_DEFINED__
     1.8  DEFINE_GUID(IID_IWbemLocator,    0xdc12a687,0x737f,0x11cf,0x88,0x4d,0x00,0xaa,0x00,0x4b,0x2e,0x24);
     1.9 +#endif
    1.10  
    1.11  /*-----------------------------------------------------------------------------
    1.12   *
    1.13 @@ -546,7 +548,6 @@
    1.14  static int
    1.15  SDL_JoystickThread(void *_data)
    1.16  {
    1.17 -    HRESULT result = S_OK;
    1.18      HWND messageWindow = 0;
    1.19      HDEVNOTIFY hNotify = 0;
    1.20      DEV_BROADCAST_DEVICEINTERFACE dbh;
    1.21 @@ -555,7 +556,7 @@
    1.22  
    1.23      SDL_memset( bOpenedXInputDevices, 0x0, sizeof(bOpenedXInputDevices) );
    1.24  
    1.25 -    result = WIN_CoInitialize();
    1.26 +    WIN_CoInitialize();
    1.27  
    1.28      SDL_memset( &wincl, 0x0, sizeof(wincl) );
    1.29      wincl.hInstance = GetModuleHandle( NULL );
    1.30 @@ -813,7 +814,6 @@
    1.31  /* detect any new joysticks being inserted into the system */
    1.32  void SDL_SYS_JoystickDetect()
    1.33  {
    1.34 -    HRESULT result;
    1.35      JoyStick_DeviceData *pCurList = NULL;
    1.36      /* only enum the devices if the joystick thread told us something changed */
    1.37      if ( s_bDeviceAdded || s_bDeviceRemoved )
    1.38 @@ -832,7 +832,7 @@
    1.39          SDL_memset( s_pKnownJoystickGUIDs, 0x0, sizeof(GUID)*MAX_JOYSTICKS );
    1.40  
    1.41          /* Look for joysticks, wheels, head trackers, gamepads, etc.. */
    1.42 -        result = IDirectInput8_EnumDevices(dinput,
    1.43 +        IDirectInput8_EnumDevices(dinput,
    1.44              DI8DEVCLASS_GAMECTRL,
    1.45              EnumJoysticksCallback,
    1.46              &pCurList, DIEDFL_ATTACHEDONLY);