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
e2765579
Commit
e2765579
authored
Jan 09, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Add tests for clippers with a destroyed window.
parent
c7cc9a1a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
2 deletions
+51
-2
clipper.c
dlls/ddraw/clipper.c
+3
-2
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+12
-0
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+12
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+12
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+12
-0
No files found.
dlls/ddraw/clipper.c
View file @
e2765579
...
...
@@ -104,7 +104,8 @@ static HRGN get_window_region(HWND window)
if
(
!
GetClientRect
(
window
,
&
client_rect
))
{
ERR
(
"Failed to get client rect.
\n
"
);
/* This can happen if the window is destroyed, for example. */
WARN
(
"Failed to get client rect.
\n
"
);
return
NULL
;
}
...
...
@@ -157,7 +158,7 @@ static HRESULT WINAPI ddraw_clipper_GetClipList(IDirectDrawClipper *iface, RECT
if
(
!
(
region
=
get_window_region
(
clipper
->
window
)))
{
wined3d_mutex_unlock
();
ERR
(
"Failed to get window region.
\n
"
);
WARN
(
"Failed to get window region.
\n
"
);
return
E_FAIL
;
}
}
...
...
dlls/ddraw/tests/ddraw1.c
View file @
e2765579
...
...
@@ -328,6 +328,18 @@ static void test_clipper_blt(void)
hr
=
IDirectDrawSurface_BltFast
(
dst_surface
,
0
,
0
,
src_surface
,
NULL
,
DDBLTFAST_WAIT
);
ok
(
hr
==
DDERR_BLTFASTCANTCLIP
||
broken
(
hr
==
E_NOTIMPL
/* NT4 */
),
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_SetHWnd
(
clipper
,
0
,
window
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clipper window, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get clip list size, hr %#x.
\n
"
,
hr
);
DestroyWindow
(
window
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_SetHWnd
(
clipper
,
0
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clipper window, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get clip list size, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface_Release
(
dst_surface
);
IDirectDrawSurface_Release
(
src_surface
);
IDirectDrawClipper_Release
(
clipper
);
...
...
dlls/ddraw/tests/ddraw2.c
View file @
e2765579
...
...
@@ -335,6 +335,18 @@ static void test_clipper_blt(void)
hr
=
IDirectDrawSurface_BltFast
(
dst_surface
,
0
,
0
,
src_surface
,
NULL
,
DDBLTFAST_WAIT
);
ok
(
hr
==
DDERR_BLTFASTCANTCLIP
||
broken
(
hr
==
E_NOTIMPL
/* NT4 */
),
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_SetHWnd
(
clipper
,
0
,
window
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clipper window, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get clip list size, hr %#x.
\n
"
,
hr
);
DestroyWindow
(
window
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_SetHWnd
(
clipper
,
0
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clipper window, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get clip list size, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface_Release
(
dst_surface
);
IDirectDrawSurface_Release
(
src_surface
);
IDirectDrawClipper_Release
(
clipper
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
e2765579
...
...
@@ -630,6 +630,18 @@ static void test_clipper_blt(void)
hr
=
IDirectDrawSurface4_BltFast
(
dst_surface
,
0
,
0
,
src_surface
,
NULL
,
DDBLTFAST_WAIT
);
ok
(
hr
==
DDERR_BLTFASTCANTCLIP
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_SetHWnd
(
clipper
,
0
,
window
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clipper window, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get clip list size, hr %#x.
\n
"
,
hr
);
DestroyWindow
(
window
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_SetHWnd
(
clipper
,
0
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clipper window, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get clip list size, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface4_Release
(
dst_surface
);
IDirectDrawSurface4_Release
(
src_surface
);
IDirectDrawClipper_Release
(
clipper
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
e2765579
...
...
@@ -623,6 +623,18 @@ static void test_clipper_blt(void)
hr
=
IDirectDrawSurface7_BltFast
(
dst_surface
,
0
,
0
,
src_surface
,
NULL
,
DDBLTFAST_WAIT
);
ok
(
hr
==
DDERR_BLTFASTCANTCLIP
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_SetHWnd
(
clipper
,
0
,
window
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clipper window, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get clip list size, hr %#x.
\n
"
,
hr
);
DestroyWindow
(
window
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_SetHWnd
(
clipper
,
0
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clipper window, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get clip list size, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface7_Release
(
dst_surface
);
IDirectDrawSurface7_Release
(
src_surface
);
IDirectDrawClipper_Release
(
clipper
);
...
...
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