Module: wine Branch: master Commit: 3808a6f37112b044796ab7548331a97ae0ec5e3c URL: http://source.winehq.org/git/wine.git/?a=commit;h=3808a6f37112b044796ab75483...
Author: Michael Stefaniuc mstefani@redhat.de Date: Tue Jul 12 12:51:54 2011 +0200
d3d10core: COM cleanup for the ID3D10InputLayout iface.
---
dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/device.c | 2 +- dlls/d3d10core/inputlayout.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 2fb21a5..21e2e95 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -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; diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index e4916bc..698c1ec 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -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; } diff --git a/dlls/d3d10core/inputlayout.c b/dlls/d3d10core/inputlayout.c index d41a9cf..7bf67f6 100644 --- a/dlls/d3d10core/inputlayout.c +++ b/dlls/d3d10core/inputlayout.c @@ -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,