Commit 2d29ec34 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d2d1/effect: Handle initial values for D2D1_PROPERTY_TYPE_BOOL.

parent 4a05b93d
......@@ -829,6 +829,7 @@ static HRESULT parse_effect_add_property(struct d2d_effect_properties *props, co
{
void *src = NULL;
UINT32 _uint32;
BOOL _bool;
p->data.offset = props->offset;
p->size = sizes[type];
......@@ -842,6 +843,12 @@ static HRESULT parse_effect_add_property(struct d2d_effect_properties *props, co
_uint32 = wcstoul(value, NULL, 10);
src = &_uint32;
break;
case D2D1_PROPERTY_TYPE_BOOL:
if (!wcscmp(value, L"true")) _bool = TRUE;
else if (!wcscmp(value, L"false")) _bool = FALSE;
else return E_INVALIDARG;
src = &_bool;
break;
case D2D1_PROPERTY_TYPE_IUNKNOWN:
case D2D1_PROPERTY_TYPE_COLOR_CONTEXT:
break;
......
......@@ -50,6 +50,10 @@ L"<?xml version='1.0'?> \
<Property name='Max' type='uint32' value='100'/> \
<Property name='Default' type='uint32' value='10'/> \
</Property> \
<Property name='Bool' type='bool'> \
<Property name='DisplayName' type='string' value='Bool property'/> \
<Property name='Default' type='bool' value='false'/> \
</Property> \
</Effect> \
";
......
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