mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- Some formatting fixes
- Some checks and fixed return values svn path=/trunk/; revision=27224
This commit is contained in:
parent
93e0ad758f
commit
0e95f8362e
2 changed files with 71 additions and 59 deletions
|
@ -489,7 +489,7 @@ Main_DirectDraw_CreateSurface (LPDIRECTDRAW iface, LPDDSURFACEDESC pDDSD,
|
|||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
ret = DDERR_GENERIC;
|
||||
ret = DDERR_INVALIDPARAMS;
|
||||
}
|
||||
_SEH_END;
|
||||
// LeaveCriticalSection(&ddcs);
|
||||
|
@ -511,7 +511,7 @@ Main_DirectDraw_CreateSurface4(LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD,
|
|||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
ret = DDERR_GENERIC;
|
||||
ret = DDERR_INVALIDPARAMS;
|
||||
}
|
||||
_SEH_END;
|
||||
|
||||
|
@ -519,8 +519,6 @@ Main_DirectDraw_CreateSurface4(LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD,
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 5 of 31 DirectDraw7_Vtable api are working simluare to windows */
|
||||
/* 8 of 31 DirectDraw7_Vtable api are under devloping / testing */
|
||||
|
||||
|
|
|
@ -41,8 +41,33 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
|
|||
DWORD num_of_surf=1;
|
||||
DWORD count;
|
||||
|
||||
|
||||
/* Fixme adding vaidlate of income param */
|
||||
if(pDDraw->lpLcl->dwLocalFlags == 0x20000)
|
||||
{
|
||||
return DDERR_NOCOOPERATIVELEVELSET;
|
||||
}
|
||||
|
||||
if(pUnkOuter)
|
||||
{
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
}
|
||||
|
||||
if(!pDDSD->dwFlags & DDSD_CAPS)
|
||||
{
|
||||
return DDERR_INVALIDPARAMS;
|
||||
}
|
||||
|
||||
if(!(pDDSD->dwFlags & DDSD_HEIGHT) && !(pDDSD->dwFlags & DDSD_HEIGHT)
|
||||
&& !(pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE))
|
||||
{
|
||||
return DDERR_INVALIDPARAMS;
|
||||
}
|
||||
|
||||
else if(pDDSD->dwFlags & DDSD_HEIGHT && pDDSD->dwFlags & DDSD_HEIGHT
|
||||
&& pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
||||
{
|
||||
return DDERR_INVALIDPARAMS;
|
||||
}
|
||||
|
||||
/* FIXME count our how many surface we need */
|
||||
|
||||
|
@ -75,9 +100,6 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
|
|||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
for( count=0; count < num_of_surf; count++ )
|
||||
{
|
||||
/* Alloc the surface interface and need members */
|
||||
|
@ -156,14 +178,10 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
|
|||
|
||||
ThisSurfLcl->dwProcessId = GetCurrentProcessId();
|
||||
|
||||
|
||||
|
||||
|
||||
/* FIXME the lpLnk */
|
||||
/* FIXME the ref counter */
|
||||
}
|
||||
|
||||
|
||||
/* Fixme call on DdCanCreate then on DdCreateSurface createsurface data here */
|
||||
|
||||
/* FIXME bIsDifferentPixelFormat being set to true or false with automatic detcitons */
|
||||
|
@ -398,7 +416,6 @@ CreateOverlaySurface(LPDDRAWI_DIRECTDRAW_INT This,
|
|||
LPDDRAWI_DDRAWSURFACE_INT *That,
|
||||
LPDDSURFACEDESC2 pDDSD)
|
||||
{
|
||||
|
||||
DDSURFACEDESC mddsdOverlay;
|
||||
DDRAWI_DDRAWSURFACE_GBL mOverlayGlobal;
|
||||
DDRAWI_DDRAWSURFACE_LCL mOverlayLocal[6];
|
||||
|
@ -540,9 +557,6 @@ CreateOverlaySurface(LPDDRAWI_DIRECTDRAW_INT This,
|
|||
mDdUpdateOverlay.rSrc.right = 50;
|
||||
mDdUpdateOverlay.rSrc.bottom = 50;
|
||||
|
||||
|
||||
|
||||
|
||||
if ( mDdUpdateOverlay.UpdateOverlay(&mDdUpdateOverlay) == DDHAL_DRIVER_NOTHANDLED)
|
||||
{
|
||||
DX_STUB_str("UpdateOverlay fail");
|
||||
|
|
Loading…
Reference in a new issue