mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Fix one crach in createsurface for DrFred
svn path=/trunk/; revision=18870
This commit is contained in:
parent
ddb12e0a7e
commit
8b676541fe
2 changed files with 5 additions and 7 deletions
|
@ -409,6 +409,4 @@ HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,H
|
||||||
}
|
}
|
||||||
|
|
||||||
return WaitVectorData.ddRVal;
|
return WaitVectorData.ddRVal;
|
||||||
|
|
||||||
return DD_OK;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,14 +31,15 @@ HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIREC
|
||||||
memset(&CanCreateData, 0, sizeof(DDHAL_CANCREATESURFACEDATA));
|
memset(&CanCreateData, 0, sizeof(DDHAL_CANCREATESURFACEDATA));
|
||||||
CanCreateData.lpDD = &This->owner->DirectDrawGlobal;
|
CanCreateData.lpDD = &This->owner->DirectDrawGlobal;
|
||||||
CanCreateData.lpDDSurfaceDesc = (DDSURFACEDESC*)pDDSD;
|
CanCreateData.lpDDSurfaceDesc = (DDSURFACEDESC*)pDDSD;
|
||||||
CanCreateData.CanCreateSurface = This->owner->HalInfo.lpDDCallbacks->CanCreateSurface;
|
|
||||||
|
|
||||||
if (CanCreateData.CanCreateSurface(&CanCreateData) == DDHAL_DRIVER_NOTHANDLED)
|
if (This->owner->DirectDrawGlobal.lpDDCBtmp->HALDD.CanCreateSurface(&CanCreateData) == DDHAL_DRIVER_NOTHANDLED)
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
if(CanCreateData.ddRVal != DD_OK)
|
if(CanCreateData.ddRVal != DD_OK)
|
||||||
return CanCreateData.ddRVal;
|
return CanCreateData.ddRVal;
|
||||||
|
|
||||||
|
/* down here we got a crach */
|
||||||
|
|
||||||
/* surface global struct */
|
/* surface global struct */
|
||||||
DDRAWI_DDRAWSURFACE_GBL Global;
|
DDRAWI_DDRAWSURFACE_GBL Global;
|
||||||
memset(&Global, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
|
memset(&Global, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
|
||||||
|
@ -78,7 +79,6 @@ HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIREC
|
||||||
CreateData.lpDDSurfaceDesc = (DDSURFACEDESC*)pDDSD;
|
CreateData.lpDDSurfaceDesc = (DDSURFACEDESC*)pDDSD;
|
||||||
CreateData.dwSCnt = 1;
|
CreateData.dwSCnt = 1;
|
||||||
CreateData.lplpSList = pLocal;
|
CreateData.lplpSList = pLocal;
|
||||||
CreateData.CreateSurface = This->owner->HalInfo.lpDDCallbacks->CreateSurface;
|
|
||||||
|
|
||||||
/* this is the call we were waiting for */
|
/* this is the call we were waiting for */
|
||||||
if(CreateData.CreateSurface(&CreateData) == DDHAL_DRIVER_NOTHANDLED)
|
if(CreateData.CreateSurface(&CreateData) == DDHAL_DRIVER_NOTHANDLED)
|
||||||
|
|
Loading…
Reference in a new issue