ddraw: Verify that the surface is in video memory in d3d_device_create().

This commit is contained in:
Henri Verbeet 2013-09-18 10:57:10 +02:00 committed by Alexandre Julliard
parent c69cd599a3
commit 4f89957161
1 changed files with 6 additions and 0 deletions

View File

@ -6762,6 +6762,12 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
return DDERR_NOPALETTEATTACHED;
}
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
{
WARN("Surface %p is not in video memory.\n", target);
return D3DERR_SURFACENOTINVIDMEM;
}
if (ddraw->flags & DDRAW_NO3D)
{
ERR_(winediag)("The application wants to create a Direct3D device, "