Nikolay Sivov : d2d1/effect: Mark most of system properties as read-only.
Alexandre Julliard
julliard at winehq.org
Mon Jun 27 16:12:51 CDT 2022
Module: wine
Branch: master
Commit: 71c23a421d2589644cf86d1181d5870599b4f454
URL: https://source.winehq.org/git/wine.git/?a=commit;h=71c23a421d2589644cf86d1181d5870599b4f454
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Jun 26 19:17:45 2022 +0300
d2d1/effect: Mark most of system properties as read-only.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/d2d1/d2d1_private.h | 1 +
dlls/d2d1/effect.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
index 0db9dd6d360..d2cb78b9b69 100644
--- a/dlls/d2d1/d2d1_private.h
+++ b/dlls/d2d1/d2d1_private.h
@@ -615,6 +615,7 @@ struct d2d_effect_property
WCHAR *name;
D2D1_PROPERTY_TYPE type;
UINT32 index;
+ BOOL readonly;
union
{
size_t offset;
diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c
index 46e53693277..9a9cac84f5f 100644
--- a/dlls/d2d1/effect.c
+++ b/dlls/d2d1/effect.c
@@ -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;
More information about the wine-cvs
mailing list