Commit 5889f822 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Move the flippable validation from CreateSurface() to ddraw_surface_create_texture().

parent 3139249a
......@@ -2855,14 +2855,6 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
DDSD->dwFlags &= ~DDSD_LPSURFACE;
}
if ((DDSD->ddsCaps.dwCaps & (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE))
== (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE)
&& !(ddraw->cooperative_level & DDSCL_EXCLUSIVE))
{
WARN("Attempted to create a flipable primary surface without DDSCL_EXCLUSIVE.\n");
return DDERR_NOEXCLUSIVEMODE;
}
/* Modify some flags */
copy_to_surfacedesc2(&desc2, DDSD);
......
......@@ -5608,6 +5608,14 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
DDRAW_dump_surface_desc(desc);
}
if ((desc->ddsCaps.dwCaps & (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE))
== (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE)
&& !(ddraw->cooperative_level & DDSCL_EXCLUSIVE))
{
WARN("Tried to create a flippable primary surface without DDSCL_EXCLUSIVE.\n");
return DDERR_NOEXCLUSIVEMODE;
}
if ((desc->ddsCaps.dwCaps & (DDSCAPS_BACKBUFFER | DDSCAPS_PRIMARYSURFACE))
== (DDSCAPS_BACKBUFFER | DDSCAPS_PRIMARYSURFACE))
{
......
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