Do not create a surface from wrong process.

if we found it was another process try call on createsurface that have started ddraw it will fail. 

svn path=/trunk/; revision=31258
This commit is contained in:
Magnus Olsen 2007-12-15 20:53:33 +00:00
parent 0f4bc4008d
commit 4485c07783

View file

@ -54,6 +54,10 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
{ {
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
if (pDDraw->lpLcl->dwProcessId != GetCurrentProcessId() )
{
return DDERR_INVALIDOBJECT;
}
if(!(pDDSD->dwFlags & DDSD_HEIGHT) && !(pDDSD->dwFlags & DDSD_HEIGHT) if(!(pDDSD->dwFlags & DDSD_HEIGHT) && !(pDDSD->dwFlags & DDSD_HEIGHT)
&& !(pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)) && !(pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE))