mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 02:41:22 +00:00
start implement of DirectDraw_GetCaps
svn path=/trunk/; revision=27211
This commit is contained in:
parent
588314ccad
commit
157883db74
2 changed files with 69 additions and 8 deletions
|
@ -131,7 +131,7 @@ Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* DirectDraw4 Vtable */
|
/* DirectDraw Vtable */
|
||||||
newThis->lpVtbl = &DirectDraw_Vtable;
|
newThis->lpVtbl = &DirectDraw_Vtable;
|
||||||
newThis->lpLcl = This->lpLcl;
|
newThis->lpLcl = This->lpLcl;
|
||||||
newThis->lpLink = This;
|
newThis->lpLink = This;
|
||||||
|
@ -451,6 +451,74 @@ Main_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface, LPDWORD lpNumCodes, LPDWORD
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI
|
||||||
|
Main_DirectDraw_GetCaps( LPDIRECTDRAW7 iface, LPDDCAPS pDriverCaps,
|
||||||
|
LPDDCAPS pHELCaps)
|
||||||
|
{
|
||||||
|
HRESULT retVal = DD_OK;
|
||||||
|
|
||||||
|
DX_WINDBG_trace();
|
||||||
|
if (!(IsBadWritePtr(pDriverCaps,sizeof(LPDDCAPS))))
|
||||||
|
{
|
||||||
|
if (!(IsBadWritePtr(pHELCaps,sizeof(LPDDCAPS))))
|
||||||
|
{
|
||||||
|
return DDERR_INVALIDPARAMS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((IsBadWritePtr(pDriverCaps,sizeof(LPDDCAPS))))
|
||||||
|
{
|
||||||
|
/* Setup hardware caps */
|
||||||
|
switch (pDriverCaps->dwSize)
|
||||||
|
{
|
||||||
|
case sizeof(DDCAPS_DX1):
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
case sizeof(DDCAPS_DX3):
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
case sizeof(DDCAPS_DX5):
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* DDCAPS_DX6 is same as DDCAPS_DX7 */
|
||||||
|
case sizeof(DDCAPS_DX7):
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((IsBadWritePtr(pHELCaps,sizeof(LPDDCAPS))))
|
||||||
|
{
|
||||||
|
/* Setup hardware caps */
|
||||||
|
switch (pHELCaps->dwSize)
|
||||||
|
{
|
||||||
|
case sizeof(DDCAPS_DX1):
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
case sizeof(DDCAPS_DX3):
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
case sizeof(DDCAPS_DX5):
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* DDCAPS_DX6 is same as DDCAPS_DX7 */
|
||||||
|
case sizeof(DDCAPS_DX7):
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
retVal = DDERR_INVALIDPARAMS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -57,13 +57,6 @@ Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
|
||||||
Main_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS pDriverCaps,
|
|
||||||
LPDDCAPS pHELCaps)
|
|
||||||
{
|
|
||||||
DX_WINDBG_trace();
|
|
||||||
DX_STUB;
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
Main_DirectDraw_GetGDISurface(LPDIRECTDRAW7 iface,
|
Main_DirectDraw_GetGDISurface(LPDIRECTDRAW7 iface,
|
||||||
|
|
Loading…
Reference in a new issue