mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
fix a memmory leak in create surface
svn path=/trunk/; revision=21461
This commit is contained in:
parent
ea5261fe10
commit
57c64e6317
2 changed files with 4 additions and 4 deletions
|
@ -66,7 +66,7 @@ HRESULT Hal_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDS
|
|||
mDdCreateSurface.CreateSurface = This->mCallbacks.HALDD.CreateSurface;
|
||||
mDdCreateSurface.lpDDSurfaceDesc = &This->mddsdPrimary;//pDDSD;
|
||||
mDdCreateSurface.lplpSList = This->mpPrimaryLocals; //cSurfaces;
|
||||
mDdCreateSurface.dwSCnt = 1 ; //ppSurfaces;
|
||||
mDdCreateSurface.dwSCnt = This->mDDrawGlobal.dsList->dwIntRefCnt ; //ppSurfaces;
|
||||
|
||||
if (This->mHALInfo.lpDDCallbacks->CreateSurface(&mDdCreateSurface) == DDHAL_DRIVER_NOTHANDLED)
|
||||
{
|
||||
|
@ -138,8 +138,7 @@ HRESULT Hal_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDS
|
|||
|
||||
if (This->mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED)
|
||||
{
|
||||
// derr(L"DirectDrawImpl[%08x]::__createPrimary Cannot create primary [%08x]", this, rv);
|
||||
return DDERR_NOTINITIALIZED;
|
||||
return DDERR_NOTINITIALIZED;
|
||||
}
|
||||
|
||||
if (mDdCanCreateSurface.ddRVal != DD_OK)
|
||||
|
@ -181,7 +180,7 @@ HRESULT Hal_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDS
|
|||
This->mpOverlayLocals[i] = &This->mOverlayLocal[i];
|
||||
}
|
||||
|
||||
for (i = 0; i < cSurfaces; i++)
|
||||
for ( i = 0; i < cSurfaces; i++)
|
||||
{
|
||||
UINT j = (i + 1) % cSurfaces;
|
||||
|
||||
|
|
|
@ -275,6 +275,7 @@ HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDE
|
|||
ret = Hel_DirectDraw_CreateSurface (iface, pDDSD, ppSurf, pUnkOuter);
|
||||
}
|
||||
|
||||
This->mDDrawGlobal.dsList = (LPDDRAWI_DDRAWSURFACE_INT)&This->mPrimaryLocal;
|
||||
|
||||
// the real surface object creation
|
||||
|
||||
|
|
Loading…
Reference in a new issue