mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:42:59 +00:00
fixing smaller bugs in NtGdiDdWaitForVerticalBlank now it is compatible with windows 2000 in all my test case.
svn path=/trunk/; revision=26282
This commit is contained in:
parent
923523688f
commit
ce8c107dbc
1 changed files with 41 additions and 34 deletions
|
@ -386,45 +386,52 @@ DWORD STDCALL NtGdiDdWaitForVerticalBlank(
|
||||||
PDD_DIRECTDRAW pDirectDraw = NULL;
|
PDD_DIRECTDRAW pDirectDraw = NULL;
|
||||||
NTSTATUS Status = FALSE;
|
NTSTATUS Status = FALSE;
|
||||||
DD_WAITFORVERTICALBLANKDATA WaitForVerticalBlankData;
|
DD_WAITFORVERTICALBLANKDATA WaitForVerticalBlankData;
|
||||||
|
LPDDHAL_WAITFORVERTICALBLANKDATA pWaitForVerticalBlankData = (LPDDHAL_WAITFORVERTICALBLANKDATA)puWaitForVerticalBlankData;
|
||||||
|
|
||||||
DPRINT1("NtGdiDdWaitForVerticalBlank\n");
|
if ((hDirectDrawLocal) &&
|
||||||
|
(puWaitForVerticalBlankData))
|
||||||
_SEH_TRY
|
|
||||||
{
|
{
|
||||||
ProbeForRead(puWaitForVerticalBlankData, sizeof(DD_WAITFORVERTICALBLANKDATA), 1);
|
RtlZeroMemory(&WaitForVerticalBlankData,sizeof(DD_WAITFORVERTICALBLANKDATA));
|
||||||
RtlCopyMemory(&WaitForVerticalBlankData,puWaitForVerticalBlankData, sizeof(DD_WAITFORVERTICALBLANKDATA));
|
|
||||||
}
|
|
||||||
_SEH_HANDLE
|
|
||||||
{
|
|
||||||
Status = _SEH_GetExceptionCode();
|
|
||||||
}
|
|
||||||
_SEH_END;
|
|
||||||
|
|
||||||
if(NT_SUCCESS(Status))
|
_SEH_TRY
|
||||||
{
|
|
||||||
pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
|
|
||||||
|
|
||||||
if (pDirectDraw != NULL)
|
|
||||||
{
|
{
|
||||||
if (pDirectDraw->DD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)
|
ProbeForRead(pWaitForVerticalBlankData, sizeof(DDHAL_WAITFORVERTICALBLANKDATA), 1);
|
||||||
{
|
WaitForVerticalBlankData.dwFlags = pWaitForVerticalBlankData->dwFlags;
|
||||||
WaitForVerticalBlankData.ddRVal = DDERR_GENERIC;
|
WaitForVerticalBlankData.bIsInVB = pWaitForVerticalBlankData->bIsInVB;
|
||||||
WaitForVerticalBlankData.lpDD = &pDirectDraw->Global;;
|
WaitForVerticalBlankData.hEvent = pWaitForVerticalBlankData->hEvent;
|
||||||
ddRVal = pDirectDraw->DD.WaitForVerticalBlank(&WaitForVerticalBlankData);
|
}
|
||||||
}
|
_SEH_HANDLE
|
||||||
_SEH_TRY
|
{
|
||||||
{
|
Status = _SEH_GetExceptionCode();
|
||||||
ProbeForWrite(puWaitForVerticalBlankData, sizeof(DD_WAITFORVERTICALBLANKDATA), 1);
|
}
|
||||||
puWaitForVerticalBlankData->ddRVal = WaitForVerticalBlankData.ddRVal;
|
_SEH_END;
|
||||||
puWaitForVerticalBlankData->bIsInVB = WaitForVerticalBlankData.bIsInVB;
|
|
||||||
}
|
|
||||||
_SEH_HANDLE
|
|
||||||
{
|
|
||||||
Status = _SEH_GetExceptionCode();
|
|
||||||
}
|
|
||||||
_SEH_END;
|
|
||||||
|
|
||||||
GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
|
if(NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
|
||||||
|
|
||||||
|
if (pDirectDraw != NULL)
|
||||||
|
{
|
||||||
|
if (pDirectDraw->DD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)
|
||||||
|
{
|
||||||
|
WaitForVerticalBlankData.ddRVal = DDERR_GENERIC;
|
||||||
|
WaitForVerticalBlankData.lpDD = &pDirectDraw->Global;;
|
||||||
|
ddRVal = pDirectDraw->DD.WaitForVerticalBlank(&WaitForVerticalBlankData);
|
||||||
|
}
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
ProbeForWrite(pWaitForVerticalBlankData, sizeof(DDHAL_WAITFORVERTICALBLANKDATA), 1);
|
||||||
|
pWaitForVerticalBlankData->ddRVal = WaitForVerticalBlankData.ddRVal;
|
||||||
|
pWaitForVerticalBlankData->bIsInVB = WaitForVerticalBlankData.bIsInVB;
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
Status = _SEH_GetExceptionCode();
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
|
GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ddRVal;
|
return ddRVal;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue