https://git.reactos.org/?p=reactos.git;a=commitdiff;h=570dd1c48a20f2618a6735...
commit 570dd1c48a20f2618a67354719ada1fe43248339 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:02 2021 +0100
[WINESYNC] d3dx9: Merge the d3dx_effect_GetTechniqueByName() 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 a2e0046fc52c4e08a64cbe76c78f184e7d5b27d2 by Michael Stefaniuc mstefani@winehq.org --- dll/directx/wine/d3dx9_36/effect.c | 28 +++++++++++----------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 0a0052d920c..11fda776c6a 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1174,22 +1174,6 @@ static D3DXHANDLE d3dx9_base_effect_get_technique(struct d3dx9_base_effect *base return get_technique_handle(&base->techniques[index]); }
-static D3DXHANDLE d3dx9_base_effect_get_technique_by_name(struct d3dx9_base_effect *base, const char *name) -{ - struct d3dx_technique *tech = get_technique_by_name(base, name); - - if (tech) - { - D3DXHANDLE t = get_technique_handle(tech); - TRACE("Returning technique %p\n", t); - return t; - } - - WARN("Technique not found.\n"); - - return NULL; -} - static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXHANDLE object, struct d3dx_parameter **annotations) { @@ -3382,10 +3366,20 @@ static D3DXHANDLE WINAPI d3dx_effect_GetTechnique(ID3DXEffect *iface, UINT index static D3DXHANDLE WINAPI d3dx_effect_GetTechniqueByName(ID3DXEffect *iface, const char *name) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_technique *tech = get_technique_by_name(&effect->base_effect, name);
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
- return d3dx9_base_effect_get_technique_by_name(&effect->base_effect, name); + if (tech) + { + D3DXHANDLE t = get_technique_handle(tech); + TRACE("Returning technique %p\n", t); + return t; + } + + WARN("Technique not found.\n"); + + return NULL; }
static D3DXHANDLE WINAPI d3dx_effect_GetPass(ID3DXEffect *iface, D3DXHANDLE technique, UINT index) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 68b6e7182db..e0f4567a1c5 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: 10aa0819138f4aaf0f872de74eaf953326afe997} +tags: {wine: a2e0046fc52c4e08a64cbe76c78f184e7d5b27d2}