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
89111704
Commit
89111704
authored
Apr 11, 2024
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Fix GetPropertyNameLength() return value.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
d05cfdd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
effect.c
dlls/d2d1/effect.c
+1
-1
d2d1.c
dlls/d2d1/tests/d2d1.c
+12
-2
No files found.
dlls/d2d1/effect.c
View file @
89111704
...
...
@@ -2130,7 +2130,7 @@ static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyNameLength(ID2D
if
(
!
(
prop
=
d2d_effect_properties_get_property_by_index
(
properties
,
index
)))
return
D2DERR_INVALID_PROPERTY
;
return
wcslen
(
prop
->
name
)
+
1
;
return
wcslen
(
prop
->
name
);
}
static
D2D1_PROPERTY_TYPE
STDMETHODCALLTYPE
d2d_effect_properties_GetType
(
ID2D1Properties
*
iface
,
...
...
dlls/d2d1/tests/d2d1.c
View file @
89111704
...
...
@@ -10862,6 +10862,7 @@ static void check_system_properties_(unsigned int line, ID2D1Effect *effect)
UINT
i
,
value_size
,
str_size
;
WCHAR
name
[
32
],
buffer
[
256
];
D2D1_PROPERTY_TYPE
type
;
UINT32
count
;
HRESULT
hr
;
static
const
struct
system_property_test
...
...
@@ -10898,7 +10899,7 @@ static void check_system_properties_(unsigned int line, ID2D1Effect *effect)
winetest_push_context
(
"Property %u"
,
i
);
name
[
0
]
=
0
;
hr
=
ID2D1Effect_GetPropertyName
(
effect
,
test
->
index
,
name
,
sizeof
(
name
));
hr
=
ID2D1Effect_GetPropertyName
(
effect
,
test
->
index
,
name
,
ARRAY_SIZE
(
name
));
ok_
(
__FILE__
,
line
)(
hr
==
S_OK
,
"Failed to get property name, hr %#lx
\n
"
,
hr
);
if
(
hr
==
D2DERR_INVALID_PROPERTY
)
{
...
...
@@ -10907,6 +10908,16 @@ static void check_system_properties_(unsigned int line, ID2D1Effect *effect)
}
ok_
(
__FILE__
,
line
)(
!
wcscmp
(
name
,
test
->
name
),
"Got unexpected property name %s, expected %s.
\n
"
,
debugstr_w
(
name
),
debugstr_w
(
test
->
name
));
count
=
ID2D1Effect_GetPropertyNameLength
(
effect
,
test
->
index
);
ok_
(
__FILE__
,
line
)(
wcslen
(
name
)
==
count
,
"Got unexpected property name length %u.
\n
"
,
count
);
name
[
0
]
=
0
;
hr
=
ID2D1Effect_GetPropertyName
(
effect
,
test
->
index
,
name
,
count
);
ok_
(
__FILE__
,
line
)(
hr
==
D2DERR_INSUFFICIENT_BUFFER
,
"Failed to get property name, hr %#lx
\n
"
,
hr
);
name
[
0
]
=
0
;
hr
=
ID2D1Effect_GetPropertyName
(
effect
,
test
->
index
,
name
,
count
+
1
);
ok_
(
__FILE__
,
line
)(
hr
==
S_OK
,
"Failed to get property name, hr %#lx
\n
"
,
hr
);
type
=
ID2D1Effect_GetType
(
effect
,
test
->
index
);
ok_
(
__FILE__
,
line
)(
type
==
test
->
type
,
"Got unexpected property type %#x, expected %#x.
\n
"
,
...
...
@@ -14750,7 +14761,6 @@ static void test_get_effect_properties(BOOL d3d11)
ok
(
!
wcscmp
(
buffW
,
L"Rect"
),
"Unexpected name %s.
\n
"
,
debugstr_w
(
buffW
));
count
=
ID2D1Properties_GetPropertyNameLength
(
properties
,
0
);
todo_wine
ok
(
count
==
4
,
"Unexpected name length %u.
\n
"
,
count
);
type
=
ID2D1Properties_GetType
(
properties
,
0
);
...
...
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