Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8eff207c
Commit
8eff207c
authored
Jun 26, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1/effect: Set property index.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
72787863
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
factory.c
dlls/d2d1/factory.c
+20
-2
No files found.
dlls/d2d1/factory.c
View file @
8eff207c
...
@@ -34,6 +34,7 @@ struct d2d_effect_property
...
@@ -34,6 +34,7 @@ struct d2d_effect_property
{
{
WCHAR
*
name
;
WCHAR
*
name
;
D2D1_PROPERTY_TYPE
type
;
D2D1_PROPERTY_TYPE
type
;
UINT32
index
;
union
union
{
{
size_t
offset
;
size_t
offset
;
...
@@ -50,6 +51,7 @@ struct d2d_effect_properties
...
@@ -50,6 +51,7 @@ struct d2d_effect_properties
size_t
offset
;
size_t
offset
;
size_t
size
;
size_t
size
;
size_t
count
;
size_t
count
;
size_t
custom_count
;
struct
struct
{
{
BYTE
*
ptr
;
BYTE
*
ptr
;
...
@@ -766,7 +768,7 @@ static struct d2d_effect_property * parse_effect_get_property(const struct d2d_e
...
@@ -766,7 +768,7 @@ static struct d2d_effect_property * parse_effect_get_property(const struct d2d_e
}
}
static
HRESULT
parse_effect_add_property
(
struct
d2d_effect_properties
*
props
,
const
WCHAR
*
name
,
static
HRESULT
parse_effect_add_property
(
struct
d2d_effect_properties
*
props
,
const
WCHAR
*
name
,
D2D1_PROPERTY_TYPE
type
,
const
WCHAR
*
value
)
UINT32
index
,
D2D1_PROPERTY_TYPE
type
,
const
WCHAR
*
value
)
{
{
static
const
UINT32
sizes
[]
=
static
const
UINT32
sizes
[]
=
{
{
...
@@ -814,6 +816,8 @@ static HRESULT parse_effect_add_property(struct d2d_effect_properties *props, co
...
@@ -814,6 +816,8 @@ static HRESULT parse_effect_add_property(struct d2d_effect_properties *props, co
}
}
p
=
&
props
->
properties
[
props
->
count
++
];
p
=
&
props
->
properties
[
props
->
count
++
];
p
->
index
=
index
;
if
(
p
->
index
<
0x80000000
)
props
->
custom_count
++
;
p
->
name
=
wcsdup
(
name
);
p
->
name
=
wcsdup
(
name
);
p
->
type
=
type
;
p
->
type
=
type
;
if
(
p
->
type
==
D2D1_PROPERTY_TYPE_STRING
)
if
(
p
->
type
==
D2D1_PROPERTY_TYPE_STRING
)
...
@@ -834,11 +838,22 @@ static HRESULT parse_effect_add_property(struct d2d_effect_properties *props, co
...
@@ -834,11 +838,22 @@ static HRESULT parse_effect_add_property(struct d2d_effect_properties *props, co
return
S_OK
;
return
S_OK
;
}
}
static
UINT32
parse_effect_get_property_index
(
struct
d2d_effect_properties
*
props
,
const
WCHAR
*
name
)
{
if
(
!
wcscmp
(
name
,
L"DisplayName"
))
return
D2D1_PROPERTY_DISPLAYNAME
;
if
(
!
wcscmp
(
name
,
L"Author"
))
return
D2D1_PROPERTY_AUTHOR
;
if
(
!
wcscmp
(
name
,
L"Category"
))
return
D2D1_PROPERTY_CATEGORY
;
if
(
!
wcscmp
(
name
,
L"Description"
))
return
D2D1_PROPERTY_DESCRIPTION
;
return
props
->
custom_count
;
}
static
HRESULT
parse_effect_property
(
IXmlReader
*
reader
,
struct
d2d_effect_registration
*
effect
)
static
HRESULT
parse_effect_property
(
IXmlReader
*
reader
,
struct
d2d_effect_registration
*
effect
)
{
{
WCHAR
*
name
=
NULL
,
*
value
=
NULL
;
WCHAR
*
name
=
NULL
,
*
value
=
NULL
;
D2D1_PROPERTY_TYPE
type
;
D2D1_PROPERTY_TYPE
type
;
unsigned
int
depth
;
unsigned
int
depth
;
UINT32
index
;
HRESULT
hr
;
HRESULT
hr
;
if
(
FAILED
(
hr
=
parse_effect_get_attribute
(
reader
,
L"name"
,
&
name
)))
if
(
FAILED
(
hr
=
parse_effect_get_attribute
(
reader
,
L"name"
,
&
name
)))
...
@@ -865,7 +880,10 @@ static HRESULT parse_effect_property(IXmlReader *reader, struct d2d_effect_regis
...
@@ -865,7 +880,10 @@ static HRESULT parse_effect_property(IXmlReader *reader, struct d2d_effect_regis
}
}
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
hr
=
parse_effect_add_property
(
&
effect
->
properties
,
name
,
type
,
value
);
{
index
=
parse_effect_get_property_index
(
&
effect
->
properties
,
name
);
hr
=
parse_effect_add_property
(
&
effect
->
properties
,
name
,
index
,
type
,
value
);
}
free
(
value
);
free
(
value
);
free
(
name
);
free
(
name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment