Commit 00bf7506 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

ddraw: Forbid creating flippable cubemaps.

parent ae78672d
......@@ -5735,6 +5735,13 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
return DDERR_INVALIDCAPS;
}
if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
{
WARN("Tried to create a flippable cubemap.\n");
HeapFree(GetProcessHeap(), 0, texture);
return DDERR_INVALIDPARAMS;
}
if (desc->ddsCaps.dwCaps & DDSCAPS_TEXTURE)
{
FIXME("Flippable textures not implemented.\n");
......@@ -5748,6 +5755,8 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
{
WARN("Tried to specify a back buffer count for a non-flippable surface.\n");
HeapFree(GetProcessHeap(), 0, texture);
if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
return DDERR_INVALIDPARAMS;
return DDERR_INVALIDCAPS;
}
}
......
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