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

d3dx9: Crop the input in ID3DXBaseEffect::SetBool().

parent 37e483d5
......@@ -1725,6 +1725,8 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetBool(ID3DXBaseEffect *iface, D3DXHA
if (param && !param->element_count && param->rows == 1 && param->columns == 1)
{
/* crop input */
b = b ? TRUE : FALSE;
set_number(param->data, param->type, &b, D3DXPT_BOOL);
return D3D_OK;
}
......
......@@ -1857,11 +1857,12 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
test_effect_parameter_value_GetTestGroup(&res[k], effect, &blob[res_value_offset], parameter, i);
/* SetBool */
bvalue = 1;
bvalue = 5;
memcpy(expected_value, &blob[res_value_offset], res_desc->Bytes);
hr = effect->lpVtbl->SetBool(effect, parameter, bvalue);
if (!res_desc->Elements && res_desc->Rows == 1 && res_desc->Columns == 1)
{
bvalue = bvalue ? TRUE : FALSE;
set_number(expected_value, res_desc->Type, &bvalue, D3DXPT_BOOL);
ok(hr == D3D_OK, "%u - %s: SetBool failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK);
}
......
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