From 78b41be88263913a28f5853ee673a851d57cc9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rico=20Sch=C3=BCller?= Date: Thu, 1 Oct 2009 11:54:33 +0200 Subject: [PATCH] d3d10: Implement ID3D10EffectType::GetMemberTypeByIndex(). --- dlls/d3d10/effect.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 6a690771b5..9927c8320e 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -3284,9 +3284,22 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_type_GetDesc(ID3D10EffectType *ifa static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByIndex(ID3D10EffectType *iface, UINT index) { - FIXME("iface %p, index %u stub!\n", iface, index); + struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface; + struct d3d10_effect_type *t; - return NULL; + TRACE("iface %p, index %u\n", iface, index); + + if (index >= This->member_count) + { + WARN("Invalid index specified\n"); + return (ID3D10EffectType *)&null_type; + } + + t = (&This->members[index])->type; + + TRACE("Returning member %p, %s\n", t, debugstr_a(t->name)); + + return (ID3D10EffectType *)t; } static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeByName(ID3D10EffectType *iface,