=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: ddraw: Forbid creating flippable cubemaps.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 17 11:19:38 CDT 2016


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

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Fri May 13 13:55:28 2016 +0200

ddraw: Forbid creating flippable cubemaps.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ddraw/surface.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index e38e668..d36afe7 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5735,6 +5735,13 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
             return DDERR_INVALIDCAPS;
         }
 
+        if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
+        {
+            WARN("Tried to create a flippable cubemap.\n");
+            HeapFree(GetProcessHeap(), 0, texture);
+            return DDERR_INVALIDPARAMS;
+        }
+
         if (desc->ddsCaps.dwCaps & DDSCAPS_TEXTURE)
         {
             FIXME("Flippable textures not implemented.\n");
@@ -5748,6 +5755,8 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
         {
             WARN("Tried to specify a back buffer count for a non-flippable surface.\n");
             HeapFree(GetProcessHeap(), 0, texture);
+            if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
+                return DDERR_INVALIDPARAMS;
             return DDERR_INVALIDCAPS;
         }
     }




More information about the wine-cvs mailing list