Commit e81d4953 authored by Aaryaman Vasishta's avatar Aaryaman Vasishta Committed by Alexandre Julliard

d3drm: Move IUnknown methods of viewports from version 1->2.

parent 49f37796
......@@ -53,15 +53,6 @@ static HRESULT WINAPI d3drm_viewport2_QueryInterface(IDirect3DRMViewport2 *iface
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
return IDirect3DRMViewport_QueryInterface(&viewport->IDirect3DRMViewport_iface, riid, out);
}
static HRESULT WINAPI d3drm_viewport1_QueryInterface(IDirect3DRMViewport *iface, REFIID riid, void **out)
{
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
if (IsEqualGUID(riid, &IID_IDirect3DRMViewport)
|| IsEqualGUID(riid, &IID_IDirect3DRMObject)
|| IsEqualGUID(riid, &IID_IUnknown))
......@@ -83,18 +74,18 @@ static HRESULT WINAPI d3drm_viewport1_QueryInterface(IDirect3DRMViewport *iface,
return S_OK;
}
static ULONG WINAPI d3drm_viewport2_AddRef(IDirect3DRMViewport2 *iface)
static HRESULT WINAPI d3drm_viewport1_QueryInterface(IDirect3DRMViewport *iface, REFIID riid, void **out)
{
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
TRACE("iface %p.\n", iface);
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
return IDirect3DRMViewport_AddRef(&viewport->IDirect3DRMViewport_iface);
return d3drm_viewport2_QueryInterface(&viewport->IDirect3DRMViewport2_iface, riid, out);
}
static ULONG WINAPI d3drm_viewport1_AddRef(IDirect3DRMViewport *iface)
static ULONG WINAPI d3drm_viewport2_AddRef(IDirect3DRMViewport2 *iface)
{
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
ULONG refcount = InterlockedIncrement(&viewport->obj.ref);
TRACE("%p increasing refcount to %u.\n", iface, refcount);
......@@ -102,18 +93,18 @@ static ULONG WINAPI d3drm_viewport1_AddRef(IDirect3DRMViewport *iface)
return refcount;
}
static ULONG WINAPI d3drm_viewport2_Release(IDirect3DRMViewport2 *iface)
static ULONG WINAPI d3drm_viewport1_AddRef(IDirect3DRMViewport *iface)
{
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
TRACE("iface %p.\n", iface);
return IDirect3DRMViewport_Release(&viewport->IDirect3DRMViewport_iface);
return d3drm_viewport2_AddRef(&viewport->IDirect3DRMViewport2_iface);
}
static ULONG WINAPI d3drm_viewport1_Release(IDirect3DRMViewport *iface)
static ULONG WINAPI d3drm_viewport2_Release(IDirect3DRMViewport2 *iface)
{
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
ULONG refcount = InterlockedDecrement(&viewport->obj.ref);
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
......@@ -124,6 +115,15 @@ static ULONG WINAPI d3drm_viewport1_Release(IDirect3DRMViewport *iface)
return refcount;
}
static ULONG WINAPI d3drm_viewport1_Release(IDirect3DRMViewport *iface)
{
struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
TRACE("iface %p.\n", iface);
return d3drm_viewport2_Release(&viewport->IDirect3DRMViewport2_iface);
}
static HRESULT WINAPI d3drm_viewport2_Clone(IDirect3DRMViewport2 *iface,
IUnknown *outer, REFIID iid, void **out)
{
......
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