[PATCH 4/5] ddraw: Only reset the device when creating an exclusive mode front buffer in ddraw_surface_create_texture().

Henri Verbeet hverbeet at codeweavers.com
Mon Nov 25 05:31:22 CST 2013


This fixes a regression introduced by commit
9443c95a895a530fdbbb607758f674467e2010c7.
---
 dlls/ddraw/surface.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 958abd7..21eff17 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5646,7 +5646,9 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
     if (!desc->dwWidth || !desc->dwHeight)
         return DDERR_INVALIDPARAMS;
 
-    if ((desc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) && (ddraw->cooperative_level & DDSCL_EXCLUSIVE))
+    if ((desc->ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER))
+            == (DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER)
+            && (ddraw->cooperative_level & DDSCL_EXCLUSIVE))
     {
         struct wined3d_swapchain_desc swapchain_desc;
 
-- 
1.7.10.4




More information about the wine-patches mailing list