https://git.reactos.org/?p=reactos.git;a=commitdiff;h=265ca68eb52359eaf6d97…
commit 265ca68eb52359eaf6d97a963e48e3d2f87d7165
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Sep 21 22:40:25 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Thu Feb 4 16:37:01 2021 +0100
[WINESYNC] d3dx9: Merge the d3dx_effect_GetParameterByName() helper.
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 78e067b0d0113f8f37c48366bda88d2454c8f841 by Michael Stefaniuc
<mstefani(a)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 8c9049f5b37..5a560490383 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -1208,25 +1208,6 @@ static D3DXHANDLE d3dx9_base_effect_get_parameter(struct
d3dx9_base_effect *base
return NULL;
}
-static D3DXHANDLE d3dx9_base_effect_get_parameter_by_name(struct d3dx9_base_effect
*base,
- D3DXHANDLE parameter, const char *name)
-{
- struct d3dx_parameter *param = get_valid_parameter(base, parameter);
- D3DXHANDLE handle;
-
- if (!name)
- {
- handle = get_parameter_handle(param);
- TRACE("Returning parameter %p.\n", handle);
- return handle;
- }
-
- handle = get_parameter_handle(get_parameter_by_name(base, param, name));
- TRACE("Returning parameter %p.\n", handle);
-
- return handle;
-}
-
static D3DXHANDLE d3dx9_base_effect_get_parameter_by_semantic(struct d3dx9_base_effect
*base,
D3DXHANDLE parameter, const char *semantic)
{
@@ -3469,10 +3450,22 @@ static D3DXHANDLE WINAPI
d3dx_effect_GetParameterByName(ID3DXEffect *iface, D3DX
const char *name)
{
struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
+ struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect,
parameter);
+ D3DXHANDLE handle;
TRACE("iface %p, parameter %p, name %s.\n", iface, parameter,
debugstr_a(name));
- return d3dx9_base_effect_get_parameter_by_name(&effect->base_effect,
parameter, name);
+ if (!name)
+ {
+ handle = get_parameter_handle(param);
+ TRACE("Returning parameter %p.\n", handle);
+ return handle;
+ }
+
+ handle = get_parameter_handle(get_parameter_by_name(&effect->base_effect,
param, name));
+ TRACE("Returning parameter %p.\n", handle);
+
+ return handle;
}
static D3DXHANDLE WINAPI d3dx_effect_GetParameterBySemantic(ID3DXEffect *iface,
D3DXHANDLE parameter,
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index ff66ec441a7..8a1752c5064 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: d265afcd8fb15438961d26f0160103846144a58e}
+tags: {wine: 78e067b0d0113f8f37c48366bda88d2454c8f841}