Commit dbfc4dfc authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dx9: Improve ID3DXBaseEffect::GetParameter().

parent e1fcd789
...@@ -739,9 +739,12 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_GetFunctionDesc(ID3DXBaseEffect *iface ...@@ -739,9 +739,12 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_GetFunctionDesc(ID3DXBaseEffect *iface
static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetParameter(ID3DXBaseEffect *iface, D3DXHANDLE parameter, UINT index) static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetParameter(ID3DXBaseEffect *iface, D3DXHANDLE parameter, UINT index)
{ {
struct ID3DXBaseEffectImpl *This = impl_from_ID3DXBaseEffect(iface); struct ID3DXBaseEffectImpl *This = impl_from_ID3DXBaseEffect(iface);
struct d3dx_parameter *param = is_valid_parameter(This, parameter);
TRACE("iface %p, parameter %p, index %u\n", This, parameter, index); TRACE("iface %p, parameter %p, index %u\n", This, parameter, index);
if (!param) param = get_parameter_by_name(This, NULL, parameter, FALSE);
if (!parameter) if (!parameter)
{ {
if (index < This->parameter_count) if (index < This->parameter_count)
...@@ -752,8 +755,6 @@ static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetParameter(ID3DXBaseEffect *iface ...@@ -752,8 +755,6 @@ static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetParameter(ID3DXBaseEffect *iface
} }
else else
{ {
struct d3dx_parameter *param = is_valid_parameter(This, parameter);
if (param && !param->element_count && index < param->member_count) if (param && !param->element_count && index < param->member_count)
{ {
TRACE("Returning parameter %p\n", param->member_handles[index]); TRACE("Returning parameter %p\n", param->member_handles[index]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment