ddraw: Simplify the root surface test in ddraw_surface7_GetPriority().

This fixes commit 97f0345f71. I assume it was
applied by mistake, since it's also missing the correct sign-off.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-01-05 15:04:53 +01:00 committed by Alexandre Julliard
parent 529451e47f
commit 8f91d3ccd8
1 changed files with 2 additions and 5 deletions

View File

@ -2377,12 +2377,9 @@ static HRESULT WINAPI ddraw_surface7_GetPriority(IDirectDrawSurface7 *iface, DWO
WARN("Called on offscreenplain surface, returning DDERR_INVALIDOBJECT.\n"); WARN("Called on offscreenplain surface, returning DDERR_INVALIDOBJECT.\n");
hr = DDERR_INVALIDOBJECT; hr = DDERR_INVALIDOBJECT;
} }
else if (!(surface->surface_desc.ddsCaps.dwCaps2 & managed) else if (!(surface->surface_desc.ddsCaps.dwCaps2 & managed) || !surface->is_complex_root)
|| (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, mipmap sublevel or non +X toplevel surface, returning DDERR_INVALIDPARAMS.\n"); WARN("Called on non-managed texture or non-root surface, returning DDERR_INVALIDPARAMS.\n");
hr = DDERR_INVALIDPARAMS; hr = DDERR_INVALIDPARAMS;
} }
else else