Commit 0339e57f authored by Aaryaman Vasishta's avatar Aaryaman Vasishta Committed by Alexandre Julliard

d3drm: Move Release from device2->device3.

parent ee6004ce
......@@ -100,14 +100,8 @@ static ULONG WINAPI d3drm_device2_AddRef(IDirect3DRMDevice2 *iface)
static ULONG WINAPI d3drm_device2_Release(IDirect3DRMDevice2 *iface)
{
struct d3drm_device *device = impl_from_IDirect3DRMDevice2(iface);
ULONG refcount = InterlockedDecrement(&device->ref);
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
if (!refcount)
HeapFree(GetProcessHeap(), 0, device);
return refcount;
return IDirect3DRMDevice3_Release(&device->IDirect3DRMDevice3_iface);
}
static HRESULT WINAPI d3drm_device2_Clone(IDirect3DRMDevice2 *iface,
......@@ -459,8 +453,14 @@ static ULONG WINAPI d3drm_device3_AddRef(IDirect3DRMDevice3 *iface)
static ULONG WINAPI d3drm_device3_Release(IDirect3DRMDevice3 *iface)
{
struct d3drm_device *device = impl_from_IDirect3DRMDevice3(iface);
ULONG refcount = InterlockedDecrement(&device->ref);
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
return d3drm_device2_Release(&device->IDirect3DRMDevice2_iface);
if (!refcount)
HeapFree(GetProcessHeap(), 0, device);
return refcount;
}
static HRESULT WINAPI d3drm_device3_Clone(IDirect3DRMDevice3 *iface,
......@@ -872,7 +872,7 @@ static ULONG WINAPI d3drm_device_win_Release(IDirect3DRMWinDevice *iface)
{
struct d3drm_device *device = impl_from_IDirect3DRMWinDevice(iface);
return d3drm_device2_Release(&device->IDirect3DRMDevice2_iface);
return d3drm_device3_Release(&device->IDirect3DRMDevice3_iface);
}
static HRESULT WINAPI d3drm_device_win_Clone(IDirect3DRMWinDevice *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