ddraw: Disallow user memory surfaces before version 4.

This commit is contained in:
Henri Verbeet 2014-03-05 10:46:36 +01:00 committed by Alexandre Julliard
parent 74b4b821ab
commit 76ab86ee7f
1 changed files with 7 additions and 0 deletions

View File

@ -5821,6 +5821,13 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
return DDERR_INVALIDCAPS; return DDERR_INVALIDCAPS;
} }
if (version < 4)
{
WARN("User memory surfaces not supported before version 4.\n");
HeapFree(GetProcessHeap(), 0, texture);
return DDERR_INVALIDPARAMS;
}
if (!(desc->dwFlags & DDSD_PITCH)) if (!(desc->dwFlags & DDSD_PITCH))
{ {
WARN("User memory surfaces should explicitly specify the pitch.\n"); WARN("User memory surfaces should explicitly specify the pitch.\n");