Fix one crach in createsurface for DrFred

svn path=/trunk/; revision=18870
This commit is contained in:
Magnus Olsen 2005-10-30 08:10:43 +00:00
parent ddb12e0a7e
commit 8b676541fe
2 changed files with 5 additions and 7 deletions

View file

@ -409,6 +409,4 @@ HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,H
}
return WaitVectorData.ddRVal;
return DD_OK;
}

View file

@ -31,14 +31,15 @@ HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIREC
memset(&CanCreateData, 0, sizeof(DDHAL_CANCREATESURFACEDATA));
CanCreateData.lpDD = &This->owner->DirectDrawGlobal;
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;
if(CanCreateData.ddRVal != DD_OK)
return CanCreateData.ddRVal;
/* down here we got a crach */
/* surface global struct */
DDRAWI_DDRAWSURFACE_GBL Global;
memset(&Global, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
@ -77,8 +78,7 @@ HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIREC
CreateData.lpDD = &This->owner->DirectDrawGlobal;
CreateData.lpDDSurfaceDesc = (DDSURFACEDESC*)pDDSD;
CreateData.dwSCnt = 1;
CreateData.lplpSList = pLocal;
CreateData.CreateSurface = This->owner->HalInfo.lpDDCallbacks->CreateSurface;
CreateData.lplpSList = pLocal;
/* this is the call we were waiting for */
if(CreateData.CreateSurface(&CreateData) == DDHAL_DRIVER_NOTHANDLED)