[PATCH 1/5] ddraw: Simplify the root surface test in ddraw_surface7_GetPriority().

Henri Verbeet hverbeet at codeweavers.com
Mon Jan 4 08:11:28 CST 2016


This fixes commit 97f0345f71679570d4eedb4ab750158d1a80001c. I assume it was
applied by mistake, since it's also missing the correct sign-off.
---
 dlls/ddraw/surface.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 87f5bb0..0969650 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -2377,12 +2377,9 @@ 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->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_MIPMAPSUBLEVEL)
-            || ((surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
-                    && !(surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP_POSITIVEX)))
+    else if (!(surface->surface_desc.ddsCaps.dwCaps2 & managed) || !surface->is_complex_root)
     {
-        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;
     }
     else
-- 
2.1.4




More information about the wine-patches mailing list