Vitaliy Margolen : dinput: Add some logging to base class.

Alexandre Julliard julliard at winehq.org
Thu Oct 20 14:25:11 CDT 2011


Module: wine
Branch: master
Commit: 271c6a6c5f1a190ca8ea4b055bb4706e965e8b75
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=271c6a6c5f1a190ca8ea4b055bb4706e965e8b75

Author: Vitaliy Margolen <wine-patches at 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);




More information about the wine-cvs mailing list