https://git.reactos.org/?p=reactos.git;a=commitdiff;h=44ec74a6a4c1d75a115c047419cf06f72bcb5c4f

commit 44ec74a6a4c1d75a115c047419cf06f72bcb5c4f
Author:     winesync <[email protected]>
AuthorDate: Mon Sep 21 22:40:26 2020 +0200
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Thu Feb 4 16:37:02 2021 +0100

    [WINESYNC] d3dx9: Move object_count out of struct d3dx9_base_effect.
    
    Signed-off-by: Michael Stefaniuc <[email protected]>
    Signed-off-by: Matteo Bruni <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id 54bdc66acf4abe1f1fa38238ed824c2372e1ff91 by Michael 
Stefaniuc <[email protected]>
---
 dll/directx/wine/d3dx9_36/effect.c | 12 ++++++------
 sdk/tools/winesync/d3dx9.cfg       |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dll/directx/wine/d3dx9_36/effect.c 
b/dll/directx/wine/d3dx9_36/effect.c
index c32b1a57563..9e773481114 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -157,7 +157,6 @@ struct d3dx9_base_effect
     struct d3dx_effect *effect;
 
     UINT technique_count;
-    UINT object_count;
 
     struct d3dx_top_level_parameter *parameters;
     struct d3dx_technique *techniques;
@@ -180,6 +179,7 @@ struct d3dx_effect
 
     struct d3dx9_base_effect base_effect;
     unsigned int parameter_count;
+    unsigned int object_count;
 
     struct ID3DXEffectStateManager *manager;
     struct IDirect3DDevice9 *device;
@@ -711,7 +711,7 @@ static void d3dx9_base_effect_cleanup(struct 
d3dx9_base_effect *base)
 
     if (base->objects)
     {
-        for (i = 0; i < base->object_count; ++i)
+        for (i = 0; i < base->effect->object_count; ++i)
         {
             free_object(&base->objects[i]);
         }
@@ -6274,10 +6274,10 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect 
*effect, const char *data, U
 
     skip_dword_unknown(&ptr, 1);
 
-    read_dword(&ptr, &base->object_count);
-    TRACE("Object count: %u.\n", base->object_count);
+    read_dword(&ptr, &effect->object_count);
+    TRACE("Object count: %u.\n", effect->object_count);
 
-    base->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 
sizeof(*base->objects) * base->object_count);
+    base->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 
sizeof(*base->objects) * effect->object_count);
     if (!base->objects)
     {
         ERR("Out of memory.\n");
@@ -6403,7 +6403,7 @@ err_out:
 
     if (base->objects)
     {
-        for (i = 0; i < base->object_count; ++i)
+        for (i = 0; i < effect->object_count; ++i)
         {
             free_object(&base->objects[i]);
         }
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 89c19b44d97..afcb40214df 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: 42839d15e3ec829f939fe1f99ac6b025f64b18de}
+tags: {wine: 54bdc66acf4abe1f1fa38238ed824c2372e1ff91}

Reply via email to