Commit 948202c4 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw: Add validation and tests for DDBLT_ROP.

parent e0edd55a
...@@ -1539,6 +1539,12 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR ...@@ -1539,6 +1539,12 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR
if (Flags & (DDBLT_COLORFILL | DDBLT_DEPTHFILL)) if (Flags & (DDBLT_COLORFILL | DDBLT_DEPTHFILL))
{ {
if (Flags & DDBLT_ROP)
{
wined3d_mutex_unlock();
WARN("DDBLT_ROP used with DDBLT_COLORFILL or DDBLT_DEPTHFILL, returning DDERR_INVALIDPARAMS.\n");
return DDERR_INVALIDPARAMS;
}
if (src_surface) if (src_surface)
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
...@@ -1569,6 +1575,16 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR ...@@ -1569,6 +1575,16 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR
} }
} }
if (Flags & DDBLT_ROP)
{
if (!DDBltFx)
{
wined3d_mutex_unlock();
WARN("DDBLT_ROP used with DDBltFx = NULL, returning DDERR_INVALIDPARAMS.\n");
return DDERR_INVALIDPARAMS;
}
}
if (Flags & DDBLT_KEYSRC && (!src_surface || !(src_surface->surface_desc.dwFlags & DDSD_CKSRCBLT))) if (Flags & DDBLT_KEYSRC && (!src_surface || !(src_surface->surface_desc.dwFlags & DDSD_CKSRCBLT)))
{ {
WARN("DDBLT_KEYDEST blit without color key in surface, returning DDERR_INVALIDPARAMS\n"); WARN("DDBLT_KEYDEST blit without color key in surface, returning DDERR_INVALIDPARAMS\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment