ddraw: Move the primary surface validation from CreateSurface() to ddraw_surface_create_texture().
This commit is contained in:
parent
2105b4493f
commit
3139249a2e
|
@ -2863,12 +2863,6 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
|
|||
return DDERR_NOEXCLUSIVEMODE;
|
||||
}
|
||||
|
||||
if((DDSD->ddsCaps.dwCaps & (DDSCAPS_BACKBUFFER | DDSCAPS_PRIMARYSURFACE)) == (DDSCAPS_BACKBUFFER | DDSCAPS_PRIMARYSURFACE))
|
||||
{
|
||||
WARN("Application wanted to create back buffer primary surface\n");
|
||||
return DDERR_INVALIDCAPS;
|
||||
}
|
||||
|
||||
/* Modify some flags */
|
||||
copy_to_surfacedesc2(&desc2, DDSD);
|
||||
|
||||
|
|
|
@ -5608,6 +5608,13 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
|
|||
DDRAW_dump_surface_desc(desc);
|
||||
}
|
||||
|
||||
if ((desc->ddsCaps.dwCaps & (DDSCAPS_BACKBUFFER | DDSCAPS_PRIMARYSURFACE))
|
||||
== (DDSCAPS_BACKBUFFER | DDSCAPS_PRIMARYSURFACE))
|
||||
{
|
||||
WARN("Tried to create a back buffer surface.\n");
|
||||
return DDERR_INVALIDCAPS;
|
||||
}
|
||||
|
||||
/* This is a special case in ddrawex, but not allowed in ddraw. */
|
||||
if ((desc->ddsCaps.dwCaps & (DDSCAPS_VIDEOMEMORY | DDSCAPS_SYSTEMMEMORY))
|
||||
== (DDSCAPS_VIDEOMEMORY | DDSCAPS_SYSTEMMEMORY))
|
||||
|
|
Loading…
Reference in New Issue