Rico Schüller : d3d10: Implement ID3D10EffectVariable: :GetMemberByName().

Alexandre Julliard julliard at winehq.org
Thu Oct 1 09:48:20 CDT 2009


Module: wine
Branch: master
Commit: 9fdd548d2e7b2c2e6880b4c1a4085c1b534555ea
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9fdd548d2e7b2c2e6880b4c1a4085c1b534555ea

Author: Rico Schüller <kgbricola at web.de>
Date:   Thu Oct  1 11:55:33 2009 +0200

d3d10: Implement ID3D10EffectVariable::GetMemberByName().

---

 dlls/d3d10/effect.c |   29 +++++++++++++++++++++++++++--
 1 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index b203baa..3ae448f 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -1997,9 +1997,34 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_Get
 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberByName(
         ID3D10EffectVariable *iface, LPCSTR name)
 {
-    FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
+    struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
+    unsigned int i;
 
-    return NULL;
+    TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
+
+    if (!name)
+    {
+        WARN("Invalid name specified\n");
+        return (ID3D10EffectVariable *)&null_variable;
+    }
+
+    for (i = 0; i < This->type->member_count; ++i)
+    {
+        struct d3d10_effect_variable *m = &This->members[i];
+
+        if (m->name)
+        {
+            if (!strcmp(m->name, name))
+            {
+                TRACE("Returning member %p\n", m);
+                return (ID3D10EffectVariable *)m;
+            }
+        }
+    }
+
+    WARN("Invalid name specified\n");
+
+    return (ID3D10EffectVariable *)&null_variable;
 }
 
 static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberBySemantic(




More information about the wine-cvs mailing list