From 15a0274fe4e9d8c547f8c28137e4087e47897964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rico=20Sch=C3=BCller?= Date: Wed, 9 Sep 2009 19:17:30 +0200 Subject: [PATCH] d3d10: Implement ID3D10EffectPass::GetAnnotationByName(). --- dlls/d3d10/effect.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 5d6f30ae430..ba9c6948448 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -1590,9 +1590,24 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnno static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_pass_GetAnnotationByName(ID3D10EffectPass *iface, LPCSTR name) { - FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name)); + struct d3d10_effect_pass *This = (struct d3d10_effect_pass *)iface; + unsigned int i; - return NULL; + TRACE("iface %p, name %s.\n", iface, debugstr_a(name)); + + for (i = 0; i < This->annotation_count; ++i) + { + struct d3d10_effect_variable *a = &This->annotations[i]; + if (!strcmp(a->name, name)) + { + TRACE("Returning annotation %p\n", a); + return (ID3D10EffectVariable *)a; + } + } + + WARN("Invalid name specified\n"); + + return (ID3D10EffectVariable *)&null_variable; } static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_Apply(ID3D10EffectPass *iface, UINT flags)