From 62a26e1ad0e18b8de8ac8154cbce6c6f66f2249b Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 15 Mar 2019 22:39:15 +0100 Subject: [PATCH] d3dx9: Pass a struct d3dx_effect to add_param_to_tree(). Signed-off-by: Michael Stefaniuc Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- dlls/d3dx9_36/effect.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index e20c9c54ad1..a45f2890b25 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -5072,7 +5072,7 @@ static int param_rb_compare(const void *key, const struct wine_rb_entry *entry) return strcmp(name, param->full_name); } -static void add_param_to_tree(struct d3dx9_base_effect *base, struct d3dx_parameter *param, +static void add_param_to_tree(struct d3dx_effect *effect, struct d3dx_parameter *param, struct d3dx_parameter *parent, char separator, unsigned int element) { const char *parent_name = parent ? parent->full_name : NULL; @@ -5127,18 +5127,18 @@ static void add_param_to_tree(struct d3dx9_base_effect *base, struct d3dx_parame memcpy(param->full_name, param->name, len); } TRACE("Full name is %s.\n", param->full_name); - wine_rb_put(&base->param_tree, param->full_name, ¶m->rb_entry); + wine_rb_put(&effect->base_effect.param_tree, param->full_name, ¶m->rb_entry); if (is_top_level_parameter(param)) for (i = 0; i < param->top_level_param->annotation_count; ++i) - add_param_to_tree(base, ¶m->top_level_param->annotations[i], param, '@', 0); + add_param_to_tree(effect, ¶m->top_level_param->annotations[i], param, '@', 0); if (param->element_count) for (i = 0; i < param->element_count; ++i) - add_param_to_tree(base, ¶m->members[i], param, '[', i); + add_param_to_tree(effect, ¶m->members[i], param, '[', i); else for (i = 0; i < param->member_count; ++i) - add_param_to_tree(base, ¶m->members[i], param, '.', 0); + add_param_to_tree(effect, ¶m->members[i], param, '.', 0); } static HRESULT d3dx_parse_effect_typedef(struct d3dx_effect *effect, struct d3dx_parameter *param, @@ -6013,7 +6013,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U } walk_parameter_tree(&base->parameters[i].param, param_set_top_level_param, &base->parameters[i]); - add_param_to_tree(base, &base->parameters[i].param, NULL, 0, 0); + add_param_to_tree(effect, &base->parameters[i].param, NULL, 0, 0); } }