d3d10core: COM cleanup for the ID3D10InputLayout iface.

This commit is contained in:
Michael Stefaniuc 2011-07-12 12:51:54 +02:00 committed by Alexandre Julliard
parent 6c866e06bf
commit 3808a6f371
3 changed files with 6 additions and 6 deletions

View File

@ -155,7 +155,7 @@ HRESULT d3d10_shader_resource_view_init(struct d3d10_shader_resource_view *view)
/* ID3D10InputLayout */
struct d3d10_input_layout
{
const struct ID3D10InputLayoutVtbl *vtbl;
ID3D10InputLayout ID3D10InputLayout_iface;
LONG refcount;
struct wined3d_vertex_declaration *wined3d_decl;

View File

@ -848,7 +848,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateInputLayout(ID3D10Device *if
}
TRACE("Created input layout %p.\n", object);
*input_layout = (ID3D10InputLayout *)object;
*input_layout = &object->ID3D10InputLayout_iface;
return S_OK;
}

View File

@ -103,7 +103,7 @@ static HRESULT d3d10_input_layout_to_wined3d_declaration(const D3D10_INPUT_ELEME
static inline struct d3d10_input_layout *impl_from_ID3D10InputLayout(ID3D10InputLayout *iface)
{
return CONTAINING_RECORD(iface, struct d3d10_input_layout, vtbl);
return CONTAINING_RECORD(iface, struct d3d10_input_layout, ID3D10InputLayout_iface);
}
/* IUnknown methods */
@ -130,7 +130,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_input_layout_QueryInterface(ID3D10InputLa
static ULONG STDMETHODCALLTYPE d3d10_input_layout_AddRef(ID3D10InputLayout *iface)
{
struct d3d10_input_layout *This = (struct d3d10_input_layout *)iface;
struct d3d10_input_layout *This = impl_from_ID3D10InputLayout(iface);
ULONG refcount = InterlockedIncrement(&This->refcount);
TRACE("%p increasing refcount to %u\n", This, refcount);
@ -145,7 +145,7 @@ static ULONG STDMETHODCALLTYPE d3d10_input_layout_AddRef(ID3D10InputLayout *ifac
static ULONG STDMETHODCALLTYPE d3d10_input_layout_Release(ID3D10InputLayout *iface)
{
struct d3d10_input_layout *This = (struct d3d10_input_layout *)iface;
struct d3d10_input_layout *This = impl_from_ID3D10InputLayout(iface);
ULONG refcount = InterlockedDecrement(&This->refcount);
TRACE("%p decreasing refcount to %u\n", This, refcount);
@ -222,7 +222,7 @@ HRESULT d3d10_input_layout_init(struct d3d10_input_layout *layout, struct d3d10_
UINT wined3d_element_count;
HRESULT hr;
layout->vtbl = &d3d10_input_layout_vtbl;
layout->ID3D10InputLayout_iface.lpVtbl = &d3d10_input_layout_vtbl;
layout->refcount = 1;
hr = d3d10_input_layout_to_wined3d_declaration(element_descs, element_count,