src/joystick/windows/SDL_dxjoystick.c
changeset 6716 1616f6b3738c
parent 6712 05f046f5886b
child 6738 b408d5a406a3
     1.1 --- a/src/joystick/windows/SDL_dxjoystick.c	Thu Nov 29 09:48:42 2012 -0800
     1.2 +++ b/src/joystick/windows/SDL_dxjoystick.c	Thu Nov 29 15:24:56 2012 -0500
     1.3 @@ -63,7 +63,7 @@
     1.4  
     1.5  /* local variables */
     1.6  static SDL_bool coinitialized = SDL_FALSE;
     1.7 -static LPDIRECTINPUT dinput = NULL;
     1.8 +static LPDIRECTINPUT8 dinput = NULL;
     1.9  static SDL_bool s_bDeviceAdded = SDL_FALSE;
    1.10  static SDL_bool s_bDeviceRemoved = SDL_FALSE;
    1.11  static int s_nInstanceID = -1;
    1.12 @@ -919,7 +919,7 @@
    1.13  SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index)
    1.14  {
    1.15      HRESULT result;
    1.16 -    LPDIRECTINPUTDEVICE device;
    1.17 +    LPDIRECTINPUTDEVICE8 device;
    1.18      DIPROPDWORD dipdw;
    1.19  	JoyStick_DeviceData *joystickdevice = SYS_Joystick;
    1.20  
    1.21 @@ -1008,7 +1008,7 @@
    1.22  			return (-1);
    1.23  		}
    1.24  
    1.25 -		/* Now get the IDirectInputDevice2 interface, instead. */
    1.26 +		/* Now get the IDirectInputDevice8 interface, instead. */
    1.27  		result = IDirectInputDevice8_QueryInterface(device,
    1.28  												   &IID_IDirectInputDevice8,
    1.29  												   (LPVOID *) & joystick->
    1.30 @@ -1017,7 +1017,7 @@
    1.31  		IDirectInputDevice8_Release(device);
    1.32  
    1.33  		if (FAILED(result)) {
    1.34 -			SetDIerror("IDirectInputDevice::QueryInterface", result);
    1.35 +			SetDIerror("IDirectInputDevice8::QueryInterface", result);
    1.36  			return (-1);
    1.37  		}
    1.38  
    1.39 @@ -1029,7 +1029,7 @@
    1.40  													DISCL_NONEXCLUSIVE |
    1.41  													DISCL_BACKGROUND);
    1.42  		if (FAILED(result)) {
    1.43 -			SetDIerror("IDirectInputDevice2::SetCooperativeLevel", result);
    1.44 +			SetDIerror("IDirectInputDevice8::SetCooperativeLevel", result);
    1.45  			return (-1);
    1.46  		}
    1.47  
    1.48 @@ -1038,7 +1038,7 @@
    1.49  			IDirectInputDevice8_SetDataFormat(joystick->hwdata->InputDevice,
    1.50  											  &c_dfDIJoystick2);
    1.51  		if (FAILED(result)) {
    1.52 -			SetDIerror("IDirectInputDevice2::SetDataFormat", result);
    1.53 +			SetDIerror("IDirectInputDevice8::SetDataFormat", result);
    1.54  			return (-1);
    1.55  		}
    1.56  
    1.57 @@ -1048,7 +1048,7 @@
    1.58  												&joystick->hwdata->Capabilities);
    1.59  
    1.60  		if (FAILED(result)) {
    1.61 -			SetDIerror("IDirectInputDevice2::GetCapabilities", result);
    1.62 +			SetDIerror("IDirectInputDevice8::GetCapabilities", result);
    1.63  			return (-1);
    1.64  		}
    1.65  
    1.66 @@ -1058,7 +1058,7 @@
    1.67  			result = IDirectInputDevice8_Acquire(joystick->hwdata->InputDevice);
    1.68  
    1.69  			if (FAILED(result)) {
    1.70 -				SetDIerror("IDirectInputDevice2::Acquire", result);
    1.71 +				SetDIerror("IDirectInputDevice8::Acquire", result);
    1.72  				return (-1);
    1.73  			}
    1.74  
    1.75 @@ -1070,7 +1070,7 @@
    1.76  
    1.77  			/* Not necessarily supported, ignore if not supported.
    1.78  			if (FAILED(result)) {
    1.79 -				SetDIerror("IDirectInputDevice2::SendForceFeedbackCommand",
    1.80 +				SetDIerror("IDirectInputDevice8::SendForceFeedbackCommand",
    1.81  						   result);
    1.82  				return (-1);
    1.83  			}
    1.84 @@ -1079,7 +1079,7 @@
    1.85  			result = IDirectInputDevice8_Unacquire(joystick->hwdata->InputDevice);
    1.86  
    1.87  			if (FAILED(result)) {
    1.88 -				SetDIerror("IDirectInputDevice2::Unacquire", result);
    1.89 +				SetDIerror("IDirectInputDevice8::Unacquire", result);
    1.90  				return (-1);
    1.91  			}
    1.92  
    1.93 @@ -1095,7 +1095,7 @@
    1.94  
    1.95  			/* Not necessarily supported, ignore if not supported.
    1.96  			if (FAILED(result)) {
    1.97 -				SetDIerror("IDirectInputDevice2::SetProperty", result);
    1.98 +				SetDIerror("IDirectInputDevice8::SetProperty", result);
    1.99  				return (-1);
   1.100  			}
   1.101  			*/
   1.102 @@ -1124,7 +1124,7 @@
   1.103  			 * to use less reliable polling. */
   1.104  			joystick->hwdata->buffered = 0;
   1.105  		} else if (FAILED(result)) {
   1.106 -			SetDIerror("IDirectInputDevice2::SetProperty", result);
   1.107 +			SetDIerror("IDirectInputDevice8::SetProperty", result);
   1.108  			return (-1);
   1.109  		}
   1.110  	}