d3drm: Reorder viewport creation function to avoid forward declarations.

This commit is contained in:
André Hentschel 2012-01-17 23:00:17 +01:00 committed by Alexandre Julliard
parent d05f3e06c8
commit c6bd442446
1 changed files with 21 additions and 23 deletions

View File

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