Commit 2c109d2d authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Move the DDSD_CAPS fixup from CreateSurface() to ddraw_surface_create_texture().

parent 06f393dc
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment