ddraw: Don't bother setting *surface to NULL in CreateSurface().
None of the callers depend on this.
This commit is contained in:
parent
659cd984d5
commit
4d9c3151c3
|
@ -2856,12 +2856,11 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
|
||||||
DDSD->dwFlags &= ~DDSD_LPSURFACE;
|
DDSD->dwFlags &= ~DDSD_LPSURFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((DDSD->ddsCaps.dwCaps & (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE)) == (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE) &&
|
if ((DDSD->ddsCaps.dwCaps & (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE))
|
||||||
!(ddraw->cooperative_level & DDSCL_EXCLUSIVE))
|
== (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE)
|
||||||
|
&& !(ddraw->cooperative_level & DDSCL_EXCLUSIVE))
|
||||||
{
|
{
|
||||||
TRACE("(%p): Attempt to create a flipable primary surface without DDSCL_EXCLUSIVE set\n",
|
WARN("Attempted to create a flipable primary surface without DDSCL_EXCLUSIVE.\n");
|
||||||
ddraw);
|
|
||||||
*surface = NULL;
|
|
||||||
return DDERR_NOEXCLUSIVEMODE;
|
return DDERR_NOEXCLUSIVEMODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2871,11 +2870,10 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
|
||||||
return DDERR_INVALIDCAPS;
|
return DDERR_INVALIDCAPS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((DDSD->ddsCaps.dwCaps & sysvidmem) == sysvidmem)
|
/* This is a special case in ddrawex, but not allowed in ddraw. */
|
||||||
|
if ((DDSD->ddsCaps.dwCaps & sysvidmem) == sysvidmem)
|
||||||
{
|
{
|
||||||
/* This is a special switch in ddrawex.dll, but not allowed in ddraw.dll */
|
WARN("Tried to create a surface in both system and video memory.\n");
|
||||||
WARN("Application tries to put the surface in both system and video memory\n");
|
|
||||||
*surface = NULL;
|
|
||||||
return DDERR_INVALIDCAPS;
|
return DDERR_INVALIDCAPS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue