mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[WINESYNC] d3dx9: Merge the d3dx_effect_GetParameterByName() 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 78e067b0d0113f8f37c48366bda88d2454c8f841 by Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
684130bdd9
commit
265ca68eb5
2 changed files with 14 additions and 21 deletions
|
@ -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,
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue