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
1ef86ad5
Commit
1ef86ad5
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: Properly clear the clip list if ddraw_clipper_SetClipList() is called with NULL region data.
parent
e2765579
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
2 deletions
+28
-2
clipper.c
dlls/ddraw/clipper.c
+4
-2
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+6
-0
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+6
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+6
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+6
-0
No files found.
dlls/ddraw/clipper.c
View file @
1ef86ad5
...
...
@@ -238,10 +238,12 @@ static HRESULT WINAPI ddraw_clipper_SetClipList(IDirectDrawClipper *iface, RGNDA
if
(
clipper
->
region
)
DeleteObject
(
clipper
->
region
);
if
(
!
(
clipper
->
region
=
ExtCreateRegion
(
NULL
,
0
,
region
)))
if
(
!
region
)
clipper
->
region
=
NULL
;
else
if
(
!
(
clipper
->
region
=
ExtCreateRegion
(
NULL
,
0
,
region
)))
{
wined3d_mutex_unlock
();
ERR
(
"Failed to create
creat
ion.
\n
"
);
ERR
(
"Failed to create
reg
ion.
\n
"
);
return
E_FAIL
;
}
...
...
dlls/ddraw/tests/ddraw1.c
View file @
1ef86ad5
...
...
@@ -339,6 +339,12 @@ static void test_clipper_blt(void)
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
);
hr
=
IDirectDrawClipper_SetClipList
(
clipper
,
NULL
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clip list, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
hr
==
DDERR_NOCLIPLIST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface_Blt
(
dst_surface
,
NULL
,
NULL
,
NULL
,
DDBLT_COLORFILL
|
DDBLT_WAIT
,
&
fx
);
ok
(
hr
==
DDERR_NOCLIPLIST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
IDirectDrawSurface_Release
(
dst_surface
);
IDirectDrawSurface_Release
(
src_surface
);
...
...
dlls/ddraw/tests/ddraw2.c
View file @
1ef86ad5
...
...
@@ -346,6 +346,12 @@ static void test_clipper_blt(void)
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
);
hr
=
IDirectDrawClipper_SetClipList
(
clipper
,
NULL
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clip list, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
hr
==
DDERR_NOCLIPLIST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface_Blt
(
dst_surface
,
NULL
,
NULL
,
NULL
,
DDBLT_COLORFILL
|
DDBLT_WAIT
,
&
fx
);
ok
(
hr
==
DDERR_NOCLIPLIST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
IDirectDrawSurface_Release
(
dst_surface
);
IDirectDrawSurface_Release
(
src_surface
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
1ef86ad5
...
...
@@ -641,6 +641,12 @@ static void test_clipper_blt(void)
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
);
hr
=
IDirectDrawClipper_SetClipList
(
clipper
,
NULL
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clip list, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
hr
==
DDERR_NOCLIPLIST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_Blt
(
dst_surface
,
NULL
,
NULL
,
NULL
,
DDBLT_COLORFILL
|
DDBLT_WAIT
,
&
fx
);
ok
(
hr
==
DDERR_NOCLIPLIST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
IDirectDrawSurface4_Release
(
dst_surface
);
IDirectDrawSurface4_Release
(
src_surface
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
1ef86ad5
...
...
@@ -634,6 +634,12 @@ static void test_clipper_blt(void)
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
);
hr
=
IDirectDrawClipper_SetClipList
(
clipper
,
NULL
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set clip list, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawClipper_GetClipList
(
clipper
,
NULL
,
NULL
,
&
ret
);
ok
(
hr
==
DDERR_NOCLIPLIST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_Blt
(
dst_surface
,
NULL
,
NULL
,
NULL
,
DDBLT_COLORFILL
|
DDBLT_WAIT
,
&
fx
);
ok
(
hr
==
DDERR_NOCLIPLIST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
IDirectDrawSurface7_Release
(
dst_surface
);
IDirectDrawSurface7_Release
(
src_surface
);
...
...
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