Commit c6bd4424 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

d3drm: Reorder viewport creation function to avoid forward declarations.

parent d05f3e06
......@@ -37,34 +37,11 @@ typedef struct {
LONG ref;
} IDirect3DRMViewportImpl;
static const struct IDirect3DRMViewportVtbl Direct3DRMViewport_Vtbl;
static inline IDirect3DRMViewportImpl *impl_from_IDirect3DRMViewport(IDirect3DRMViewport *iface)
{
return CONTAINING_RECORD(iface, IDirect3DRMViewportImpl, IDirect3DRMViewport_iface);
}
HRESULT Direct3DRMViewport_create(IUnknown** ppObj)
{
IDirect3DRMViewportImpl* object;
TRACE("(%p)\n", ppObj);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMViewportImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IDirect3DRMViewport_iface.lpVtbl = &Direct3DRMViewport_Vtbl;
object->ref = 1;
*ppObj = (IUnknown*)object;
return S_OK;
}
/*** IUnknown methods ***/
static HRESULT WINAPI IDirect3DRMViewportImpl_QueryInterface(IDirect3DRMViewport* iface,
REFIID riid, void** object)
......@@ -506,3 +483,24 @@ static const struct IDirect3DRMViewportVtbl Direct3DRMViewport_Vtbl =
IDirect3DRMViewportImpl_GetProjection,
IDirect3DRMViewportImpl_GetDirect3DViewport
};
HRESULT Direct3DRMViewport_create(IUnknown** ppObj)
{
IDirect3DRMViewportImpl* object;
TRACE("(%p)\n", ppObj);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMViewportImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IDirect3DRMViewport_iface.lpVtbl = &Direct3DRMViewport_Vtbl;
object->ref = 1;
*ppObj = (IUnknown*)object;
return S_OK;
}
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