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: Riccardo Bortolato <rikyz619@gmail.com> Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f3e3c895c7
commit
97f0345f71
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user