d3dx9: Improve ID3DXBaseEffect::GetParameter().

This commit is contained in:
Rico Schüller 2011-04-26 09:20:51 +02:00 committed by Alexandre Julliard
parent e1fcd78928
commit dbfc4dfc8d
1 changed files with 3 additions and 2 deletions

View File

@ -739,9 +739,12 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_GetFunctionDesc(ID3DXBaseEffect *iface
static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetParameter(ID3DXBaseEffect *iface, D3DXHANDLE parameter, UINT index)
{
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);
if (!param) param = get_parameter_by_name(This, NULL, parameter, FALSE);
if (!parameter)
{
if (index < This->parameter_count)
@ -752,8 +755,6 @@ static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetParameter(ID3DXBaseEffect *iface
}
else
{
struct d3dx_parameter *param = is_valid_parameter(This, parameter);
if (param && !param->element_count && index < param->member_count)
{
TRACE("Returning parameter %p\n", param->member_handles[index]);