d2d1/effect: Mark most of system properties as read-only.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2022-06-26 19:17:45 +03:00 committed by Alexandre Julliard
parent 9c4aea6de1
commit 71c23a421d
2 changed files with 11 additions and 0 deletions

View file

@ -615,6 +615,7 @@ struct d2d_effect_property
WCHAR *name;
D2D1_PROPERTY_TYPE type;
UINT32 index;
BOOL readonly;
union
{
size_t offset;

View file

@ -81,6 +81,14 @@ HRESULT d2d_effect_properties_add(struct d2d_effect_properties *props, const WCH
p = &props->properties[props->count++];
p->index = index;
if (p->index < 0x80000000) props->custom_count++;
if (index == D2D1_PROPERTY_CACHED
|| index == D2D1_PROPERTY_PRECISION)
{
p->readonly = FALSE;
}
else
p->readonly = TRUE;
p->name = wcsdup(name);
p->type = type;
if (p->type == D2D1_PROPERTY_TYPE_STRING)
@ -213,6 +221,8 @@ static HRESULT d2d_effect_property_get_value(const struct d2d_effect *effect,
static HRESULT d2d_effect_property_set_value(struct d2d_effect_property *property,
D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 size)
{
if (property->readonly) return E_INVALIDARG;
FIXME("Unimplemented.\n");
return S_OK;