Henri Verbeet : ddraw: Move the DDSD_CAPS fixup from CreateSurface() to ddraw_surface_create_texture().
Alexandre Julliard
julliard at winehq.org
Fri Nov 29 13:24:27 CST 2013
Module: wine
Branch: master
Commit: 2c109d2df19d148b1e2a69230a73aa01814689f1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2c109d2df19d148b1e2a69230a73aa01814689f1
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Nov 28 09:55:40 2013 +0100
ddraw: Move the DDSD_CAPS fixup from CreateSurface() to ddraw_surface_create_texture().
---
dlls/ddraw/ddraw.c | 6 ------
dlls/ddraw/surface.c | 3 +++
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index efdf28e..389038c 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -2836,12 +2836,6 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
return E_POINTER; /* unchecked */
}
- if (!(DDSD->dwFlags & DDSD_CAPS))
- {
- /* DVIDEO.DLL does forget the DDSD_CAPS flag ... *sigh* */
- DDSD->dwFlags |= DDSD_CAPS;
- }
-
/* Modify some flags */
copy_to_surfacedesc2(&desc2, DDSD);
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 18b23b2..a13a5e4 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5608,6 +5608,9 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
DDRAW_dump_surface_desc(desc);
}
+ /* Ensure DDSD_CAPS is always set. */
+ desc->dwFlags |= DDSD_CAPS;
+
/* If the surface is of the 'ALLOCONLOAD' type, ignore the LPSURFACE
* field. Frank Herbert's Dune specifies a NULL pointer for lpSurface. */
if ((desc->ddsCaps.dwCaps & DDSCAPS_ALLOCONLOAD) || !desc->lpSurface)
More information about the wine-cvs
mailing list