From aee42377984ab01c4aef0885780a707b606ec333 Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Sun, 19 Apr 2009 20:33:25 -0600 Subject: [PATCH] dinput: Remove redundant stuff. --- dlls/dinput/joystick.c | 34 ---------------------------------- dlls/dinput/joystick_linux.c | 6 +++--- dlls/dinput/joystick_osx.c | 8 ++++---- dlls/dinput/joystick_private.h | 4 ---- 4 files changed, 7 insertions(+), 45 deletions(-) diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c index fbf05ecb484..d57ef7b5791 100644 --- a/dlls/dinput/joystick.c +++ b/dlls/dinput/joystick.c @@ -31,40 +31,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput); -/****************************************************************************** - * Acquire : gets exclusive control of the joystick - */ -HRESULT WINAPI JoystickAGenericImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) -{ - JoystickGenericImpl *This = (JoystickGenericImpl *)iface; - - TRACE("(%p)\n",This); - - if (This->base.acquired) { - WARN("already acquired\n"); - return S_FALSE; - } - - This->base.acquired = 1; - - return DI_OK; -} - -/****************************************************************************** - * Unacquire : frees the joystick - */ -HRESULT WINAPI JoystickAGenericImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface) -{ - JoystickGenericImpl *This = (JoystickGenericImpl *)iface; - HRESULT res; - - TRACE("(%p)\n",This); - - if ((res = IDirectInputDevice2AImpl_Unacquire(iface)) != DI_OK) return res; - - return DI_OK; -} - /****************************************************************************** * SetProperty : change input device properties */ diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index fcf15527ab5..c7facab9d21 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -611,7 +611,7 @@ static HRESULT WINAPI JoystickLinuxAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) TRACE("(%p)\n",This); - res = JoystickAGenericImpl_Acquire(iface); + res = IDirectInputDevice2AImpl_Acquire(iface); if (res != DI_OK) return res; @@ -622,7 +622,7 @@ static HRESULT WINAPI JoystickLinuxAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) This->joyfd=open(This->dev,O_RDONLY); if (This->joyfd==-1) { ERR("open(%s) failed: %s\n", This->dev, strerror(errno)); - JoystickAGenericImpl_Unacquire(iface); + IDirectInputDevice2AImpl_Unacquire(iface); return DIERR_NOTFOUND; } } @@ -640,7 +640,7 @@ static HRESULT WINAPI JoystickLinuxAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface) TRACE("(%p)\n",This); - res = JoystickAGenericImpl_Unacquire(iface); + res = IDirectInputDevice2AImpl_Unacquire(iface); if (res != DI_OK) return res; diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index 7305bb90243..1446b6e60ed 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -865,8 +865,8 @@ static const IDirectInputDevice8AVtbl JoystickAvt = IDirectInputDevice2AImpl_EnumObjects, JoystickAGenericImpl_GetProperty, JoystickAGenericImpl_SetProperty, - JoystickAGenericImpl_Acquire, - JoystickAGenericImpl_Unacquire, + IDirectInputDevice2AImpl_Acquire, + IDirectInputDevice2AImpl_Unacquire, JoystickAGenericImpl_GetDeviceState, IDirectInputDevice2AImpl_GetDeviceData, IDirectInputDevice2AImpl_SetDataFormat, @@ -907,8 +907,8 @@ static const IDirectInputDevice8WVtbl JoystickWvt = IDirectInputDevice2WImpl_EnumObjects, XCAST(GetProperty)JoystickAGenericImpl_GetProperty, XCAST(SetProperty)JoystickAGenericImpl_SetProperty, - XCAST(Acquire)JoystickAGenericImpl_Acquire, - XCAST(Unacquire)JoystickAGenericImpl_Unacquire, + XCAST(Acquire)IDirectInputDevice2AImpl_Acquire, + XCAST(Unacquire)IDirectInputDevice2AImpl_Unacquire, XCAST(GetDeviceState)JoystickAGenericImpl_GetDeviceState, XCAST(GetDeviceData)IDirectInputDevice2AImpl_GetDeviceData, XCAST(SetDataFormat)IDirectInputDevice2AImpl_SetDataFormat, diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h index 803e0dd2bba..d1f16667b3f 100644 --- a/dlls/dinput/joystick_private.h +++ b/dlls/dinput/joystick_private.h @@ -79,8 +79,4 @@ HRESULT WINAPI JoystickAGenericImpl_Poll(LPDIRECTINPUTDEVICE8A iface); HRESULT WINAPI JoystickAGenericImpl_GetDeviceState( LPDIRECTINPUTDEVICE8A iface, DWORD len, LPVOID ptr); -HRESULT WINAPI JoystickAGenericImpl_Acquire(LPDIRECTINPUTDEVICE8A iface); - -HRESULT WINAPI JoystickAGenericImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface); - #endif /* __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H */