From 4e37ce697b2c9c15b5df86a6ea21c756b5cfaa9b Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sun, 16 Nov 2008 02:19:43 +0000 Subject: [PATCH] - Fix AlphaBlend checks that pass wine bitmap gdi32 crosstests. Tested in 16 and 24 bit mode Qemu and 32 bit mode hardware, with our AlphaBlend rendering demo program. svn path=/trunk/; revision=37385 --- reactos/subsystems/win32/win32k/objects/bitblt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/reactos/subsystems/win32/win32k/objects/bitblt.c b/reactos/subsystems/win32/win32k/objects/bitblt.c index db8e188e202..14d888ba2d1 100644 --- a/reactos/subsystems/win32/win32k/objects/bitblt.c +++ b/reactos/subsystems/win32/win32k/objects/bitblt.c @@ -96,11 +96,24 @@ NtGdiAlphaBlend( DestRect.top = YOriginDest; DestRect.right = XOriginDest + WidthDest; DestRect.bottom = YOriginDest + HeightDest; + IntLPtoDP(DCDest, (LPPOINT)&DestRect, 2); SourceRect.left = XOriginSrc; SourceRect.top = YOriginSrc; SourceRect.right = XOriginSrc + WidthSrc; SourceRect.bottom = YOriginSrc + HeightSrc; + IntLPtoDP(DCSrc, (LPPOINT)&SourceRect, 2); + + if (!DestRect.right || + !DestRect.bottom || + !SourceRect.right || + !SourceRect.bottom) + { + if (hDCSrc != hDCDest) + DC_UnlockDc(DCSrc); + DC_UnlockDc(DCDest); + return TRUE; + } /* Determine surfaces to be used in the bitblt */ BitmapDest = BITMAPOBJ_LockBitmap(DCDest->w.hBitmap);