Fix one crach in createsurface for DrFred
Modified: trunk/reactos/lib/ddraw/hal/ddraw.c
Modified: trunk/reactos/lib/ddraw/main/surface.c
_____
Modified: trunk/reactos/lib/ddraw/hal/ddraw.c
--- trunk/reactos/lib/ddraw/hal/ddraw.c 2005-10-30 07:47:15 UTC (rev
18869)
+++ trunk/reactos/lib/ddraw/hal/ddraw.c 2005-10-30 08:10:43 UTC (rev
18870)
@@ -409,6 +409,4 @@
}
return WaitVectorData.ddRVal;
-
- return DD_OK;
}
_____
Modified: trunk/reactos/lib/ddraw/main/surface.c
--- trunk/reactos/lib/ddraw/main/surface.c 2005-10-30 07:47:15 UTC
(rev 18869)
+++ trunk/reactos/lib/ddraw/main/surface.c 2005-10-30 08:10:43 UTC
(rev 18870)
@@ -31,14 +31,15 @@
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(&CanCre
ateData) == 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 @@
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)