Riccardo Bortolato : ddraw: Check if surface is a mipmap sublevel or a non-positive X top level surface through caps in ddraw_surface7_GetPriority ().

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 23 18:22:07 CST 2015


Module: wine
Branch: master
Commit: 97f0345f71679570d4eedb4ab750158d1a80001c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=97f0345f71679570d4eedb4ab750158d1a80001c

Author: Riccardo Bortolato <rikyz619 at gmail.com>
Date:   Mon Dec 21 18:38:39 2015 +0100

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 at gmail.com>
Signed-off-by: Stefan Dösinger <stefandoesinger at gmx.at>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ddraw/surface.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index c303ed0..8a91d4b 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -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




More information about the wine-cvs mailing list