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
6057041d
Commit
6057041d
authored
Aug 28, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Make the overlay tests pass on Windows 7.
parent
e0db367a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
overlay.c
dlls/ddraw/tests/overlay.c
+15
-6
No files found.
dlls/ddraw/tests/overlay.c
View file @
6057041d
...
...
@@ -96,17 +96,18 @@ static BOOL CreateDirectDraw(void)
static
void
rectangle_settings
(
void
)
{
IDirectDrawSurface7
*
overlay
=
create_overlay
(
64
,
64
,
MAKEFOURCC
(
'U'
,
'Y'
,
'V'
,
'Y'
));
HRESULT
hr
;
HRESULT
hr
,
hr2
;
RECT
rect
=
{
0
,
0
,
64
,
64
};
LONG
posx
,
posy
;
/* The dx sdk sort of implies that rect must be set when DDOVER_SHOW is used. Show that this is wrong */
/* The dx sdk sort of implies that rect must be set when DDOVER_SHOW is used. This is not true
* in Windows Vista and earlier, but changed in Win7 */
hr
=
IDirectDrawSurface7_UpdateOverlay
(
overlay
,
NULL
,
primary
,
&
rect
,
DDOVER_SHOW
,
NULL
);
ok
(
hr
==
DD_OK
,
"IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_UpdateOverlay
(
overlay
,
NULL
,
primary
,
NULL
,
DDOVER_HIDE
,
NULL
);
ok
(
hr
==
DD_OK
,
"IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_UpdateOverlay
(
overlay
,
NULL
,
primary
,
NULL
,
DDOVER_SHOW
,
NULL
);
ok
(
hr
==
DD_OK
,
"IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x
\n
"
,
hr
);
ok
(
hr
==
DD_OK
||
hr
==
DDERR_INVALIDPARAMS
,
"IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x
\n
"
,
hr
);
/* Show that the overlay position is the (top, left) coordinate of the dest rectangle */
rect
.
top
+=
16
;
...
...
@@ -122,13 +123,21 @@ static void rectangle_settings(void) {
posx
,
posy
,
rect
.
left
,
rect
.
top
);
/* Passing a NULL dest rect sets the position to 0/0 . Visually it can be seen that the overlay overlays the whole primary(==screen)*/
hr
=
IDirectDrawSurface7_UpdateOverlay
(
overlay
,
NULL
,
primary
,
NULL
,
0
,
NULL
);
ok
(
hr
==
DD_OK
,
"IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x
\n
"
,
hr
);
hr
2
=
IDirectDrawSurface7_UpdateOverlay
(
overlay
,
NULL
,
primary
,
NULL
,
0
,
NULL
);
ok
(
hr
2
==
DD_OK
||
hr2
==
DDERR_INVALIDPARAMS
,
"IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_GetOverlayPosition
(
overlay
,
&
posx
,
&
posy
);
ok
(
hr
==
DD_OK
,
"IDirectDrawSurface7_GetOverlayPosition failed with hr=0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr2
))
{
ok
(
posx
==
0
&&
posy
==
0
,
"Overlay position is (%d, %d), expected (%d, %d)
\n
"
,
posx
,
posy
,
0
,
0
);
}
else
{
/* Otherwise the position remains untouched */
ok
(
posx
==
32
&&
posy
==
16
,
"Overlay position is (%d, %d), expected (%d, %d)
\n
"
,
posx
,
posy
,
32
,
16
);
}
/* The position cannot be retrieved when the overlay is not shown */
hr
=
IDirectDrawSurface7_UpdateOverlay
(
overlay
,
NULL
,
primary
,
&
rect
,
DDOVER_HIDE
,
NULL
);
ok
(
hr
==
DD_OK
,
"IDirectDrawSurface7_UpdateOverlay failed with hr=0x%08x
\n
"
,
hr
);
...
...
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