Rico Schüller : d3d10: Implement ID3D10EffectType:: GetMemberTypeBySemantic().

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


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

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

d3d10: Implement ID3D10EffectType::GetMemberTypeBySemantic().

---

 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 2c7d1f3..6a04e4a 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -3338,9 +3338,34 @@ static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTy
 static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_type_GetMemberTypeBySemantic(ID3D10EffectType *iface,
         LPCSTR semantic)
 {
-    FIXME("iface %p, semantic %s stub!\n", iface, debugstr_a(semantic));
+    struct d3d10_effect_type *This = (struct d3d10_effect_type *)iface;
+    unsigned int i;
 
-    return NULL;
+    TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic));
+
+    if (!semantic)
+    {
+        WARN("Invalid semantic specified\n");
+        return (ID3D10EffectType *)&null_type;
+    }
+
+    for (i = 0; i < This->member_count; ++i)
+    {
+        struct d3d10_effect_type_member *typem = &This->members[i];
+
+        if (typem->semantic)
+        {
+            if (!strcmp(typem->semantic, semantic))
+            {
+                TRACE("Returning type %p.\n", typem->type);
+                return (ID3D10EffectType *)typem->type;
+            }
+        }
+    }
+
+    WARN("Invalid semantic specified\n");
+
+    return (ID3D10EffectType *)&null_type;
 }
 
 static LPCSTR STDMETHODCALLTYPE d3d10_effect_type_GetMemberName(ID3D10EffectType *iface, UINT index)




More information about the wine-cvs mailing list