Commit dba4428b authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

dinput: Trace reference count in a consistent way.

parent e29effc6
......@@ -1140,7 +1140,7 @@ ULONG WINAPI IDirectInputDevice2WImpl_Release(LPDIRECTINPUTDEVICE8W iface)
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE("(%p) releasing from %d\n", This, ref + 1);
TRACE("(%p) ref %d\n", This, ref);
if (ref) return ref;
......@@ -1215,7 +1215,9 @@ HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(LPDIRECTINPUTDEVICE8A ifa
ULONG WINAPI IDirectInputDevice2WImpl_AddRef(LPDIRECTINPUTDEVICE8W iface)
{
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
return InterlockedIncrement(&This->ref);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE( "(%p) ref %d\n", This, ref );
return ref;
}
ULONG WINAPI IDirectInputDevice2AImpl_AddRef(LPDIRECTINPUTDEVICE8A iface)
......
......@@ -527,7 +527,7 @@ static ULONG WINAPI IDirectInputAImpl_AddRef(LPDIRECTINPUT7A iface)
IDirectInputImpl *This = impl_from_IDirectInput7A( iface );
ULONG ref = InterlockedIncrement(&This->ref);
TRACE( "(%p) incrementing from %d\n", This, ref - 1);
TRACE( "(%p) ref %d\n", This, ref );
return ref;
}
......@@ -542,7 +542,7 @@ static ULONG WINAPI IDirectInputAImpl_Release(LPDIRECTINPUT7A iface)
IDirectInputImpl *This = impl_from_IDirectInput7A( iface );
ULONG ref = InterlockedDecrement( &This->ref );
TRACE( "(%p) releasing from %d\n", This, ref + 1 );
TRACE( "(%p) ref %d\n", This, ref );
if (ref == 0)
{
......
......@@ -167,7 +167,9 @@ static ULONG WINAPI LinuxInputEffectImpl_AddRef(
LPDIRECTINPUTEFFECT iface)
{
LinuxInputEffectImpl *This = impl_from_IDirectInputEffect(iface);
return InterlockedIncrement(&(This->ref));
ULONG ref = InterlockedIncrement(&This->ref);
TRACE( "(%p) ref %d\n", This, ref );
return ref;
}
static HRESULT WINAPI LinuxInputEffectImpl_Download(
......@@ -759,6 +761,8 @@ static ULONG WINAPI LinuxInputEffectImpl_Release(LPDIRECTINPUTEFFECT iface)
LinuxInputEffectImpl *This = impl_from_IDirectInputEffect(iface);
ULONG ref = InterlockedDecrement(&(This->ref));
TRACE( "(%p) ref %d\n", This, ref );
if (ref == 0)
{
LinuxInputEffectImpl_Stop(iface);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment