Fixed follow bug Create_DirectDraw

1. did not set the DDRAWILCL_DIRECTDRAW7 to This->lpLcl->dwLocalFlags
2. did not initate the This->lpLcl->dwLocalRefCnt to 0 and Main_DDrawSurface_AddRef did wrong count then 

svn path=/trunk/; revision=25017
This commit is contained in:
Magnus Olsen 2006-12-02 16:57:21 +00:00
parent a709c01ca8
commit ca9afb4298

View file

@ -889,7 +889,6 @@ Create_DirectDraw (LPGUID pGUID,
return DDERR_INVALIDDIRECTDRAWGUID;
}
if (This == NULL)
{
/* We do not have any DirectDraw interface alloc */
@ -919,8 +918,10 @@ Create_DirectDraw (LPGUID pGUID,
/* FIXME cleanup */
return DDERR_OUTOFMEMORY;
}
This->lpLcl->lpGbl = &ddgbl;
This->lpLcl->dwLocalRefCnt = 0;
This->lpLcl->dwLocalFlags = DDRAWILCL_DIRECTDRAW7;
*pIface = (LPDIRECTDRAW)This;
@ -928,7 +929,7 @@ Create_DirectDraw (LPGUID pGUID,
{
return DDERR_INVALIDPARAMS;
}
if (StartDirectDraw((LPDIRECTDRAW*)This, pGUID) == DD_OK);
{