mirror of
https://github.com/reactos/reactos.git
synced 2024-07-05 04:06:22 +00:00
Time to cellbrate we got bltblt hal working again
1. Createsurface can only create one surface at moment 2. crash can occured if wrong param are being putin to createsurface for no error check are done. 3. createsurface are still under havy devloping svn path=/trunk/; revision=27221
This commit is contained in:
parent
7ae32c6424
commit
4f5153dd3a
|
@ -121,8 +121,29 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
|
|||
|
||||
ThisSurfInt->lpLcl = ThisSurfLcl;
|
||||
ThisSurfLcl->lpGbl = ThisSurfaceGbl;
|
||||
|
||||
ThisSurfLcl->ddsCaps.dwCaps = pDDSD->ddsCaps.dwCaps;
|
||||
|
||||
ThisSurfaceGbl->lpDD = pDDraw->lpLcl->lpGbl;
|
||||
|
||||
ThisSurfaceGbl->lpDDHandle = pDDraw->lpLcl->lpGbl;
|
||||
|
||||
/* FIXME ? */
|
||||
ThisSurfaceGbl->dwGlobalFlags = DDRAWISURFGBL_ISGDISURFACE;
|
||||
|
||||
if (pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
||||
{
|
||||
ThisSurfaceGbl->wWidth = pDDraw->lpLcl->lpGbl->vmiData.dwDisplayWidth;
|
||||
ThisSurfaceGbl->wHeight = pDDraw->lpLcl->lpGbl->vmiData.dwDisplayHeight;
|
||||
ThisSurfaceGbl->lPitch = pDDraw->lpLcl->lpGbl->vmiData.lDisplayPitch;
|
||||
ThisSurfaceGbl->dwLinearSize = pDDraw->lpLcl->lpGbl->vmiData.lDisplayPitch;
|
||||
}
|
||||
else
|
||||
{
|
||||
ThisSurfaceGbl->wWidth = (WORD)pDDSD->dwWidth;
|
||||
ThisSurfaceGbl->wHeight = (WORD)pDDSD->dwHeight;
|
||||
ThisSurfaceGbl->lPitch = pDDSD->lPitch;
|
||||
ThisSurfaceGbl->dwLinearSize = pDDSD->lPitch;
|
||||
}
|
||||
|
||||
/* FIXME set right version */
|
||||
ThisSurfInt->lpVtbl = &DirectDrawSurface7_Vtable;
|
||||
|
@ -135,6 +156,9 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
|
|||
|
||||
ThisSurfLcl->dwProcessId = GetCurrentProcessId();
|
||||
|
||||
|
||||
|
||||
|
||||
/* FIXME the lpLnk */
|
||||
/* FIXME the ref counter */
|
||||
}
|
||||
|
@ -142,11 +166,49 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
|
|||
|
||||
/* Fixme call on DdCanCreate then on DdCreateSurface createsurface data here */
|
||||
|
||||
/* FIXME bIsDifferentPixelFormat being set to true or false with automatic detcitons */
|
||||
mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE;
|
||||
|
||||
mDdCanCreateSurface.lpDD = pDDraw->lpLcl->lpGbl;
|
||||
mDdCanCreateSurface.CanCreateSurface = pDDraw->lpLcl->lpDDCB->HALDD.CanCreateSurface;
|
||||
mDdCanCreateSurface.lpDDSurfaceDesc = (LPDDSURFACEDESC) pDDSD;
|
||||
mDdCanCreateSurface.ddRVal = DDERR_GENERIC;
|
||||
|
||||
if (mDdCanCreateSurface.CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED)
|
||||
{
|
||||
DX_STUB_str("mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED fail");
|
||||
return DDERR_NOTINITIALIZED;
|
||||
}
|
||||
|
||||
if (mDdCanCreateSurface.ddRVal != DD_OK)
|
||||
{
|
||||
DX_STUB_str("mDdCanCreateSurface fail");
|
||||
return DDERR_NOTINITIALIZED;
|
||||
}
|
||||
|
||||
mDdCreateSurface.lpDD = pDDraw->lpLcl->lpGbl;
|
||||
mDdCreateSurface.CreateSurface = pDDraw->lpLcl->lpGbl->lpDDCBtmp->HALDD.CreateSurface;
|
||||
mDdCreateSurface.ddRVal = DDERR_GENERIC;
|
||||
mDdCreateSurface.dwSCnt = slist_int[0]->dwIntRefCnt + 1; // is this correct
|
||||
mDdCreateSurface.lpDDSurfaceDesc = (LPDDSURFACEDESC) pDDSD;
|
||||
mDdCreateSurface.lplpSList = slist_lcl;
|
||||
|
||||
if (mDdCreateSurface.CreateSurface(&mDdCreateSurface) == DDHAL_DRIVER_NOTHANDLED)
|
||||
{
|
||||
return DDERR_NOTINITIALIZED;
|
||||
}
|
||||
|
||||
if (mDdCreateSurface.ddRVal != DD_OK)
|
||||
{
|
||||
return mDdCreateSurface.ddRVal;
|
||||
}
|
||||
|
||||
*ppSurf = &slist_int[0]->lpVtbl;
|
||||
return DD_FALSE;
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CopyDDSurfDescToDDSurfDesc2(LPDDSURFACEDESC2 dst_pDesc, LPDDSURFACEDESC src_pDesc)
|
||||
{
|
||||
RtlZeroMemory(dst_pDesc,sizeof(DDSURFACEDESC2));
|
||||
|
|
|
@ -80,7 +80,7 @@ HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
|
|||
|
||||
DX_WINDBG_trace();
|
||||
|
||||
if (( ThisDest->lpLcl->lpGbl->lpDD->lpDDCBtmp->cbDDSurfaceCallbacks.dwFlags
|
||||
if (( ThisDest->lpLcl->lpGbl->lpDD->lpDDCBtmp->HALDDSurface.dwFlags
|
||||
& DDHAL_SURFCB32_BLT) != DDHAL_SURFCB32_BLT)
|
||||
{
|
||||
return DDERR_GENERIC;
|
||||
|
@ -95,7 +95,7 @@ HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
|
|||
}
|
||||
|
||||
mDdBlt.lpDD = ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpGbl;
|
||||
mDdBlt.Blt = ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpDDCB->cbDDSurfaceCallbacks.Blt;
|
||||
mDdBlt.Blt = ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpGbl->lpDDCBtmp->HALDDSurface.Blt;
|
||||
mDdBlt.lpDDDestSurface = ThisDest->lpLcl->lpSurfMore->slist[0];
|
||||
|
||||
ThisDest->lpLcl->lpSurfMore->slist[0]->hDC =
|
||||
|
|
Loading…
Reference in a new issue