Commit a33b20a0 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

d3dx9: Merge the d3dx_effect_GetTechnique() helper.

parent a2e0046f
......@@ -1157,19 +1157,6 @@ static HRESULT d3dx9_base_effect_get_pass_desc(struct d3dx9_base_effect *base,
return D3D_OK;
}
static D3DXHANDLE d3dx9_base_effect_get_technique(struct d3dx9_base_effect *base, UINT index)
{
if (index >= base->technique_count)
{
WARN("Invalid argument specified.\n");
return NULL;
}
TRACE("Returning technique %p.\n", &base->techniques[index]);
return get_technique_handle(&base->techniques[index]);
}
static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXHANDLE object,
struct d3dx_parameter **annotations)
{
......@@ -3356,7 +3343,15 @@ static D3DXHANDLE WINAPI d3dx_effect_GetTechnique(ID3DXEffect *iface, UINT index
TRACE("iface %p, index %u.\n", iface, index);
return d3dx9_base_effect_get_technique(&effect->base_effect, index);
if (index >= effect->base_effect.technique_count)
{
WARN("Invalid argument specified.\n");
return NULL;
}
TRACE("Returning technique %p.\n", &effect->base_effect.techniques[index]);
return get_technique_handle(&effect->base_effect.techniques[index]);
}
static D3DXHANDLE WINAPI d3dx_effect_GetTechniqueByName(ID3DXEffect *iface, const char *name)
......
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