mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +00:00
fixing a small check in createsurface
svn path=/trunk/; revision=25154
This commit is contained in:
@@ -305,6 +305,11 @@ HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDE
|
||||
/* setup DDSD */
|
||||
if (pDDSD->dwFlags & DDSD_PIXELFORMAT)
|
||||
{
|
||||
if (pDDSD->ddpfPixelFormat.dwSize != sizeof(DDPIXELFORMAT))
|
||||
{
|
||||
/* FIXME relase the memory that we have alloc */
|
||||
return DDERR_INVALIDPIXELFORMAT;
|
||||
}
|
||||
That->lpLcl->dwFlags |= DDRAWISURF_HASPIXELFORMAT;
|
||||
memcpy(&That->lpLcl->lpGbl->ddpfSurface,&pDDSD->ddpfPixelFormat, sizeof(DDPIXELFORMAT));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user