Rico Schüller : d3d10: Implement ID3D10EffectVariable: :GetMemberBySemantic().
Alexandre Julliard
julliard at winehq.org
Thu Oct 1 09:48:20 CDT 2009
Module: wine
Branch: master
Commit: 7b520e1f31bd8b509f8431803c5938983152207c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7b520e1f31bd8b509f8431803c5938983152207c
Author: Rico Schüller <kgbricola at web.de>
Date: Thu Oct 1 11:55:50 2009 +0200
d3d10: Implement ID3D10EffectVariable::GetMemberBySemantic().
---
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 3ae448f..a167a11 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -2030,9 +2030,34 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_Get
static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetMemberBySemantic(
ID3D10EffectVariable *iface, LPCSTR semantic)
{
- FIXME("iface %p, semantic %s stub!\n", iface, debugstr_a(semantic));
+ struct d3d10_effect_variable *This = (struct d3d10_effect_variable *)iface;
+ unsigned int i;
- return NULL;
+ TRACE("iface %p, semantic %s.\n", iface, debugstr_a(semantic));
+
+ if (!semantic)
+ {
+ WARN("Invalid semantic 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->semantic)
+ {
+ if (!strcmp(m->semantic, semantic))
+ {
+ TRACE("Returning member %p\n", m);
+ return (ID3D10EffectVariable *)m;
+ }
+ }
+ }
+
+ WARN("Invalid semantic specified\n");
+
+ return (ID3D10EffectVariable *)&null_variable;
}
static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_GetElement(
More information about the wine-cvs
mailing list