Commit 97f0345f authored by Riccardo Bortolato's avatar Riccardo Bortolato Committed by Alexandre Julliard

ddraw: Check if surface is a mipmap sublevel or a non-positive X top level…

ddraw: Check if surface is a mipmap sublevel or a non-positive X top level surface through caps in ddraw_surface7_GetPriority(). Signed-off-by: 's avatarRiccardo Bortolato <rikyz619@gmail.com> Signed-off-by: 's avatarStefan Dösinger <stefandoesinger@gmx.at> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f3e3c895
......@@ -2377,9 +2377,12 @@ static HRESULT WINAPI ddraw_surface7_GetPriority(IDirectDrawSurface7 *iface, DWO
WARN("Called on offscreenplain surface, returning DDERR_INVALIDOBJECT.\n");
hr = DDERR_INVALIDOBJECT;
}
else if (!(surface->surface_desc.ddsCaps.dwCaps2 & managed) || !surface->wined3d_texture)
else if (!(surface->surface_desc.ddsCaps.dwCaps2 & managed)
|| (surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_MIPMAPSUBLEVEL)
|| ((surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
&& !(surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP_POSITIVEX)))
{
WARN("Called on non-managed texture or mipmap sublevel, returning DDERR_INVALIDPARAMS.\n");
WARN("Called on non-managed texture, mipmap sublevel or non +X toplevel surface, returning DDERR_INVALIDPARAMS.\n");
hr = DDERR_INVALIDPARAMS;
}
else
......
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