dinput: Add some logging to base class.

This commit is contained in:
Vitaliy Margolen 2011-10-20 07:42:44 -06:00 committed by Alexandre Julliard
parent 6b59b05244
commit 271c6a6c5f
1 changed files with 7 additions and 2 deletions

View File

@ -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);