https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3b863b369321355830167…
commit 3b863b369321355830167cb4a720fa5c688d3367
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Sep 21 22:40:29 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Thu Feb 4 16:37:03 2021 +0100
[WINESYNC] d3dx9: Pass a struct d3dx_effect to d3dx9_base_effect_cleanup().
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 2f16d2f4ca86263571797d9544a9534e8aa29c16 by Michael Stefaniuc
<mstefani(a)winehq.org>
---
dll/directx/wine/d3dx9_36/effect.c | 19 ++++++++++---------
sdk/tools/winesync/d3dx9.cfg | 2 +-
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c
index 2eab4fd4097..3dacdebd23a 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -687,8 +687,9 @@ static void free_technique(struct d3dx_technique *technique)
technique->name = NULL;
}
-static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base)
+static void d3dx9_base_effect_cleanup(struct d3dx_effect *effect)
{
+ struct d3dx9_base_effect *base = &effect->base_effect;
unsigned int i;
TRACE("base %p.\n", base);
@@ -697,7 +698,7 @@ static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base)
if (base->parameters)
{
- for (i = 0; i < base->effect->parameter_count; ++i)
+ for (i = 0; i < effect->parameter_count; ++i)
free_top_level_parameter(&base->parameters[i]);
HeapFree(GetProcessHeap(), 0, base->parameters);
base->parameters = NULL;
@@ -711,14 +712,14 @@ static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect
*base)
base->techniques = NULL;
}
- if (base->effect->objects)
+ if (effect->objects)
{
- for (i = 0; i < base->effect->object_count; ++i)
+ for (i = 0; i < effect->object_count; ++i)
{
- free_object(&base->effect->objects[i]);
+ free_object(&effect->objects[i]);
}
- HeapFree(GetProcessHeap(), 0, base->effect->objects);
- base->effect->objects = NULL;
+ heap_free(effect->objects);
+ effect->objects = NULL;
}
}
@@ -726,7 +727,7 @@ static void free_effect(struct d3dx_effect *effect)
{
TRACE("Free effect %p\n", effect);
- d3dx9_base_effect_cleanup(&effect->base_effect);
+ d3dx9_base_effect_cleanup(effect);
if (effect->pool)
{
@@ -6306,7 +6307,7 @@ static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect
*base,
debugstr_a(skip_constants[i]), j);
HeapFree(GetProcessHeap(), 0, skip_constants_buffer);
HeapFree(GetProcessHeap(), 0, skip_constants);
- d3dx9_base_effect_cleanup(base);
+ d3dx9_base_effect_cleanup(effect);
return D3DERR_INVALIDCALL;
}
}
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 26ac628eb93..61529b927f5 100644
--- a/sdk/tools/winesync/d3dx9.cfg
+++ b/sdk/tools/winesync/d3dx9.cfg
@@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h:
sdk/inc
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h:
sdk/include/dxsdk/d3dx9of.h,
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h:
sdk/include/dxsdk/d3dx9shape.h,
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h:
sdk/include/dxsdk/d3dx9xof.h}
-tags: {wine: 7738fec56b8d55f006babf4d9fb7a1b79cf363af}
+tags: {wine: 2f16d2f4ca86263571797d9544a9534e8aa29c16}