mirror of
https://github.com/reactos/reactos.git
synced 2024-10-18 23:18:56 +00:00
- Hack fix for gdibatch, please retest Acrobat reader 7.
svn path=/trunk/; revision=46349
This commit is contained in:
parent
0a82f829ed
commit
440c35e960
|
@ -72,7 +72,7 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
|
||||||
{
|
{
|
||||||
pdcattr = dc->pdcattr;
|
pdcattr = dc->pdcattr;
|
||||||
}
|
}
|
||||||
// The thread is approaching the end of sunset.
|
// FYI! The thread is approaching the end of sunset.
|
||||||
switch(pHdr->Cmd)
|
switch(pHdr->Cmd)
|
||||||
{
|
{
|
||||||
case GdiBCPatBlt: // Highest pri first!
|
case GdiBCPatBlt: // Highest pri first!
|
||||||
|
@ -139,6 +139,7 @@ NTSTATUS
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtGdiFlushUserBatch(VOID)
|
NtGdiFlushUserBatch(VOID)
|
||||||
{
|
{
|
||||||
|
BOOL Hit;
|
||||||
PTEB pTeb = NtCurrentTeb();
|
PTEB pTeb = NtCurrentTeb();
|
||||||
ULONG GdiBatchCount = pTeb->GdiBatchCount;
|
ULONG GdiBatchCount = pTeb->GdiBatchCount;
|
||||||
|
|
||||||
|
@ -160,8 +161,26 @@ NtGdiFlushUserBatch(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// No need to init anything, just go!
|
// No need to init anything, just go!
|
||||||
for (; GdiBatchCount > 0; GdiBatchCount--)
|
for (Hit = FALSE; GdiBatchCount > 0; GdiBatchCount--)
|
||||||
{
|
{ /*
|
||||||
|
Looks like a hack,
|
||||||
|
feels like a hack,
|
||||||
|
you're right it's a hack,
|
||||||
|
due to the lack,
|
||||||
|
of kernel thread locking when it is in sunset!
|
||||||
|
*/
|
||||||
|
_SEH2_TRY
|
||||||
|
{
|
||||||
|
((PGDIBATCHHDR)pHdr)->Cmd = ((PGDIBATCHHDR)pHdr)->Cmd;
|
||||||
|
}
|
||||||
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
Hit = TRUE;
|
||||||
|
}
|
||||||
|
_SEH2_END;
|
||||||
|
|
||||||
|
if (Hit) break;
|
||||||
|
|
||||||
// Process Gdi Batch!
|
// Process Gdi Batch!
|
||||||
pHdr += GdiFlushUserBatch(pDC, (PGDIBATCHHDR) pHdr);
|
pHdr += GdiFlushUserBatch(pDC, (PGDIBATCHHDR) pHdr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue