d3dx9: Don't double check the technique.

This commit is contained in:
Rico Schüller 2012-08-21 12:26:22 +02:00 committed by Alexandre Julliard
parent bf528c5e9c
commit f9a4a9db1b
1 changed files with 3 additions and 13 deletions

View File

@ -3527,19 +3527,9 @@ static HRESULT WINAPI ID3DXEffectImpl_SetTechnique(ID3DXEffect *iface, D3DXHANDL
if (tech)
{
UINT i;
for (i = 0; i < base->technique_count; ++i)
{
struct d3dx_technique *t = get_technique_struct(base->technique_handles[i]);
if (tech == t)
{
This->active_technique = get_technique_handle(t);
TRACE("Technique %u (%p)\n", i, tech);
return D3D_OK;
}
}
This->active_technique = get_technique_handle(tech);
TRACE("Technique %p\n", tech);
return D3D_OK;
}
WARN("Invalid argument supplied.\n");