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

commit de908e3bd1311ae565d1a0416e8e9201d9dced13
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: Merge the d3dx_effect_GetAnnotationByName() helper.
    
    Signed-off-by: Michael Stefaniuc <[email protected]>
    Signed-off-by: Matteo Bruni <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id 1dd9104724b333fe27c2a1b7e57b31c29a252420 by Michael 
Stefaniuc <[email protected]>
---
 dll/directx/wine/d3dx9_36/effect.c | 49 ++++++++++++++++----------------------
 sdk/tools/winesync/d3dx9.cfg       |  2 +-
 2 files changed, 22 insertions(+), 29 deletions(-)

diff --git a/dll/directx/wine/d3dx9_36/effect.c 
b/dll/directx/wine/d3dx9_36/effect.c
index 87f842621ed..9086b5a2bec 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -1290,33 +1290,6 @@ static UINT get_annotation_from_object(struct 
d3dx9_base_effect *base,
     }
 }
 
-static D3DXHANDLE d3dx9_base_effect_get_annotation_by_name(struct 
d3dx9_base_effect *base,
-        D3DXHANDLE object, const char *name)
-{
-    struct d3dx_parameter *annotation = NULL;
-    struct d3dx_parameter *annotations = NULL;
-    UINT annotation_count = 0;
-
-    if (!name)
-    {
-        WARN("Invalid argument specified\n");
-        return NULL;
-    }
-
-    annotation_count = get_annotation_from_object(base, object, &annotations);
-
-    annotation = get_annotation_by_name(base, annotation_count, annotations, 
name);
-    if (annotation)
-    {
-        TRACE("Returning parameter %p\n", annotation);
-        return get_parameter_handle(annotation);
-    }
-
-    WARN("Annotation not found.\n");
-
-    return NULL;
-}
-
 static BOOL walk_parameter_tree(struct d3dx_parameter *param, 
walk_parameter_dep_func param_func,
         void *data)
 {
@@ -3520,10 +3493,30 @@ static D3DXHANDLE WINAPI 
d3dx_effect_GetAnnotationByName(ID3DXEffect *iface, D3D
         const char *name)
 {
     struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
+    struct d3dx_parameter *annotation = NULL;
+    struct d3dx_parameter *annotations = NULL;
+    unsigned int annotation_count;
 
     TRACE("iface %p, object %p, name %s.\n", iface, object, debugstr_a(name));
 
-    return d3dx9_base_effect_get_annotation_by_name(&effect->base_effect, 
object, name);
+    if (!name)
+    {
+        WARN("Invalid argument specified\n");
+        return NULL;
+    }
+
+    annotation_count = get_annotation_from_object(&effect->base_effect, 
object, &annotations);
+
+    annotation = get_annotation_by_name(&effect->base_effect, 
annotation_count, annotations, name);
+    if (annotation)
+    {
+        TRACE("Returning parameter %p\n", annotation);
+        return get_parameter_handle(annotation);
+    }
+
+    WARN("Annotation not found.\n");
+
+    return NULL;
 }
 
 static HRESULT WINAPI d3dx_effect_SetValue(ID3DXEffect *iface, D3DXHANDLE 
parameter,
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 789ff4d8160..aa2fde3f1d9 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: 7a1df2b0069bde1a9a022c6454fb8b3e06181fd0}
+tags: {wine: 1dd9104724b333fe27c2a1b7e57b31c29a252420}

Reply via email to