Author: fireball Date: Wed Sep 15 12:56:35 2010 New Revision: 48776
URL: http://svn.reactos.org/svn/reactos?rev=48776&view=rev Log: - Take absolute value of ScanLines in GreSetDIBits because it can be negative. Fixes last major issue with arwinss-in-trunk.
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/bitblt.c [iso-8859-1] Wed Sep 15 12:56:35 2010 @@ -585,7 +585,7 @@
// Create source surface SourceSize.cx = bmi->bmiHeader.biWidth; - SourceSize.cy = ScanLines; + SourceSize.cy = abs(ScanLines);
// Determine width of DIB DIBWidth = DIB_GetDIBWidthBytes(SourceSize.cx, bmi->bmiHeader.biBitCount); @@ -654,10 +654,9 @@
// Determine destination rectangle DestRect.left = 0; - DestRect.top = abs(bmi->bmiHeader.biHeight) - StartScan - ScanLines; + DestRect.top = abs(bmi->bmiHeader.biHeight) - StartScan - SourceSize.cy; DestRect.right = SourceSize.cx; - DestRect.bottom = DestRect.top + ScanLines; - + DestRect.bottom = DestRect.top + SourceSize.cy; copyBitsResult = GreCopyBits(DestSurf, SourceSurf, NULL, &exlo.xlo, &DestRect, &ZeroPoint);
// If it succeeded, return number of scanlines copies