Module: wine Branch: master Commit: f493e56d4d879e2dcaeee52842d204ad01559a20 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f493e56d4d879e2dcaeee52842...
Author: Rico Schüller kgbricola@web.de Date: Wed Sep 9 19:17:42 2009 +0200
d3d10: Implement ID3D10EffectConstantBuffer::GetAnnotationByName().
---
dlls/d3d10/effect.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index d0f24d4..3ac6875 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -1972,9 +1972,24 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buf static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetAnnotationByName( ID3D10EffectConstantBuffer *iface, LPCSTR name) { - FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name)); + struct d3d10_effect_local_buffer *This = (struct d3d10_effect_local_buffer *)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 struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_constant_buffer_GetMemberByIndex(