Thx royce3 yes it should be, it was in the orginal patch
before I did a clean up of alot of change. thx you did see that mistake
Quoting Royce Mitchell III <royce3(a)ev1.net>et>:
greatlrd(a)svn.reactos.com wrote:
Add a check to see if surface can be create, it
return it can be create, but
still createsurface return invaild param
Modified: trunk/reactos/lib/ddraw/main/surface.c
------------------------------------------------------------------------
*Modified: trunk/reactos/lib/ddraw/main/surface.c*
--- trunk/reactos/lib/ddraw/main/surface.c 2005-08-08 18:59:56 UTC (rev
17218)
+++
trunk/reactos/lib/ddraw/main/surface.c 2005-08-08 21:29:25 UTC (rev
17219)
@@ -63,12 +63,26 @@
CreateData.dwSCnt = 1;
CreateData.lplpSList = &pLocal;
- if(This->owner->DriverCallbacks.DdMain.CreateSurface (&CreateData) !=
DDHAL_DRIVER_HANDLED)
- return DDERR_INVALIDPARAMS;
+ DDHAL_CANCREATESURFACEDATA CanCreateData;
+ memset(&CanCreateData, 0, sizeof(DD_CANCREATESURFACEDATA));
+ CanCreateData.lpDD = &This->owner->DirectDrawGlobal;
+ CanCreateData.lpDDSurfaceDesc = (DDSURFACEDESC*)pDDSD;
+
+ if (This->owner->DriverCallbacks.DdMain.CanCreateSurface (&CanCreateData)
== DDHAL_DRIVER_NOTHANDLED)
+ return DDERR_INVALIDPARAMS;
+
if(CreateData.ddRVal != DD_OK)
shouldn't this be "if(CanCreateData.ddRVal != DD_OK)" ???
+ return CanCreateData.ddRVal;
+
+
+ if(This->owner->DriverCallbacks.DdMain.CreateSurface (&CreateData) ==
DDHAL_DRIVER_NOTHANDLED)
+ return DDERR_INVALIDPARAMS;
+
+ if(CreateData.ddRVal != DD_OK)
return CreateData.ddRVal;
+
OutputDebugString(L"This does not get hit.");
return DD_OK;
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.com
http://reactos.com:8080/mailman/listinfo/ros-dev