Vitaliy Margolen : dinput: Add some logging to base class.
Module: wine Branch: master Commit: 271c6a6c5f1a190ca8ea4b055bb4706e965e8b75 URL: http://source.winehq.org/git/wine.git/?a=commit;h=271c6a6c5f1a190ca8ea4b055b... Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Thu Oct 20 07:42:44 2011 -0600 dinput: Add some logging to base class. --- dlls/dinput/device.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index b088eff..b72b0d5 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -783,6 +783,8 @@ HRESULT WINAPI IDirectInputDevice2WImpl_Acquire(LPDIRECTINPUTDEVICE8W iface) IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface); HRESULT res; + TRACE("(%p)\n", This); + if (!This->data_format.user_df) return DIERR_INVALIDPARAM; if (This->dwCoopLevel & DISCL_FOREGROUND && This->win != GetForegroundWindow()) return DIERR_OTHERAPPHASPRIO; @@ -813,6 +815,8 @@ HRESULT WINAPI IDirectInputDevice2WImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface) IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface); HRESULT res; + TRACE("(%p)\n", This); + EnterCriticalSection(&This->crit); res = !This->acquired ? DI_NOEFFECT : DI_OK; This->acquired = 0; @@ -930,9 +934,10 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(LPDIRECTINPUTDEVICE ULONG WINAPI IDirectInputDevice2WImpl_Release(LPDIRECTINPUTDEVICE8W iface) { IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface); - ULONG ref; + ULONG ref = InterlockedDecrement(&(This->ref)); + + TRACE("(%p) releasing from %d\n", This, ref + 1); - ref = InterlockedDecrement(&(This->ref)); if (ref) return ref; IDirectInputDevice_Unacquire(iface);
participants (1)
-
Alexandre Julliard