mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Add a check to see if surface can be create, it return it can be create, but still createsurface return invaild param
svn path=/trunk/; revision=17219
This commit is contained in:
parent
c8a180611e
commit
d483bdfcae
1 changed files with 16 additions and 2 deletions
|
@ -63,12 +63,26 @@ HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIREC
|
|||
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)
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue