https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3a9af49488b21e4aa00a66...
commit 3a9af49488b21e4aa00a66b196329d00d9990834 Author: winesync ros-dev@reactos.org AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou jerome.gardou@reactos.org CommitDate: Thu Feb 4 16:37:01 2021 +0100
[WINESYNC] d3dx9: Merge the d3dx_effect_GetAnnotation() helper.
Signed-off-by: Michael Stefaniuc mstefani@winehq.org Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
wine commit id 7a1df2b0069bde1a9a022c6454fb8b3e06181fd0 by Michael Stefaniuc mstefani@winehq.org --- dll/directx/wine/d3dx9_36/effect.c | 33 +++++++++++++-------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 14 insertions(+), 21 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 5e879db5668..87f842621ed 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1290,25 +1290,6 @@ static UINT get_annotation_from_object(struct d3dx9_base_effect *base, } }
-static D3DXHANDLE d3dx9_base_effect_get_annotation(struct d3dx9_base_effect *base, - D3DXHANDLE object, UINT index) -{ - struct d3dx_parameter *annotations = NULL; - UINT annotation_count = 0; - - annotation_count = get_annotation_from_object(base, object, &annotations); - - if (index < annotation_count) - { - TRACE("Returning parameter %p\n", &annotations[index]); - return get_parameter_handle(&annotations[index]); - } - - WARN("Annotation not found.\n"); - - return NULL; -} - static D3DXHANDLE d3dx9_base_effect_get_annotation_by_name(struct d3dx9_base_effect *base, D3DXHANDLE object, const char *name) { @@ -3517,10 +3498,22 @@ static D3DXHANDLE WINAPI d3dx_effect_GetFunctionByName(ID3DXEffect *iface, const static D3DXHANDLE WINAPI d3dx_effect_GetAnnotation(ID3DXEffect *iface, D3DXHANDLE object, UINT index) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *annotations = NULL; + unsigned int annotation_count;
TRACE("iface %p, object %p, index %u.\n", iface, object, index);
- return d3dx9_base_effect_get_annotation(&effect->base_effect, object, index); + annotation_count = get_annotation_from_object(&effect->base_effect, object, &annotations); + + if (index < annotation_count) + { + TRACE("Returning parameter %p\n", &annotations[index]); + return get_parameter_handle(&annotations[index]); + } + + WARN("Annotation not found.\n"); + + return NULL; }
static D3DXHANDLE WINAPI d3dx_effect_GetAnnotationByName(ID3DXEffect *iface, D3DXHANDLE object, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 4418b435c97..789ff4d8160 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: 45e7e2f2d501d92436a00f97edec660a2f7a2927} +tags: {wine: 7a1df2b0069bde1a9a022c6454fb8b3e06181fd0}