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
a8498016
Commit
a8498016
authored
Mar 16, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Add DDBLT_DEPTHFILL validation.
parent
1d8e92c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
surface.c
dlls/ddraw/surface.c
+14
-4
No files found.
dlls/ddraw/surface.c
View file @
a8498016
...
...
@@ -1537,26 +1537,36 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR
wined3d_mutex_lock
();
if
(
Flags
&
DDBLT_COLORFILL
)
if
(
Flags
&
(
DDBLT_COLORFILL
|
DDBLT_DEPTHFILL
)
)
{
if
(
src_surface
)
{
wined3d_mutex_unlock
();
WARN
(
"D
DBLT_COLORFILL
is not compatible with source surfaces, returning DDERR_INVALIDPARAMS
\n
"
);
WARN
(
"D
epth or colorfill
is not compatible with source surfaces, returning DDERR_INVALIDPARAMS
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
if
(
!
DDBltFx
)
{
wined3d_mutex_unlock
();
WARN
(
"D
DBLT_COLORFILL
used with DDBltFx = NULL, returning DDERR_INVALIDPARAMS.
\n
"
);
WARN
(
"D
epth or colorfill
used with DDBltFx = NULL, returning DDERR_INVALIDPARAMS.
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
if
(
dst_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_ZBUFFER
)
if
((
Flags
&
(
DDBLT_COLORFILL
|
DDBLT_DEPTHFILL
))
==
(
DDBLT_COLORFILL
|
DDBLT_DEPTHFILL
))
Flags
&=
~
DDBLT_DEPTHFILL
;
if
((
dst_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_ZBUFFER
)
&&
(
Flags
&
DDBLT_COLORFILL
))
{
wined3d_mutex_unlock
();
WARN
(
"DDBLT_COLORFILL used on a depth buffer, returning DDERR_INVALIDPARAMS.
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
if
(
!
(
dst_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_ZBUFFER
)
&&
(
Flags
&
DDBLT_DEPTHFILL
))
{
wined3d_mutex_unlock
();
WARN
(
"DDBLT_DEPTHFILL used on a color buffer, returning DDERR_INVALIDPARAMS.
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
}
if
(
Flags
&
DDBLT_KEYSRC
&&
(
!
src_surface
||
!
(
src_surface
->
surface_desc
.
dwFlags
&
DDSD_CKSRCBLT
)))
...
...
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