Commit 8797a9ed authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Require a non-zero back buffer count for swap chains.

parent 23f47b57
......@@ -5647,6 +5647,13 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
return DDERR_INVALIDCAPS;
}
if (!(desc->dwFlags & DDSD_BACKBUFFERCOUNT) || !desc->dwBackBufferCount)
{
WARN("Tried to create a flippable primary surface without any back buffers.\n");
HeapFree(GetProcessHeap(), 0, texture);
return DDERR_INVALIDCAPS;
}
if (!(ddraw->cooperative_level & DDSCL_EXCLUSIVE))
{
WARN("Tried to create a flippable primary surface without DDSCL_EXCLUSIVE.\n");
......
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