Fixed follow bug Create_DirectDraw
authorMagnus Olsen <magnus@greatlord.com>
Sat, 2 Dec 2006 16:57:21 +0000 (16:57 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Sat, 2 Dec 2006 16:57:21 +0000 (16:57 +0000)
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

reactos/dll/directx/ddraw/startup.c

index 4435c05..7dde0f0 100644 (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);
     {