Author: khornicek
Date: Mon Feb 28 12:47:01 2011
New Revision: 50935
URL:
http://svn.reactos.org/svn/reactos?rev=50935&view=rev
Log:
[WIN32K]
Fix calculating of ScanLines and source point in NtGdiGetDIBitsInternal for top-down
bitmaps to more closely mimic win xp behavior. (Timo - high five for your test app)
See issue #5524 for more details.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Mon Feb 28
12:47:01 2011
@@ -939,9 +939,26 @@
rcDest.bottom = ScanLines;
rcDest.right = psurf->SurfObj.sizlBitmap.cx;
- srcPoint.x = 0;
- srcPoint.y = height < 0 ?
- psurf->SurfObj.sizlBitmap.cy - (StartScan + ScanLines) : StartScan;
+ srcPoint.x = 0;
+
+ if(height < 0)
+ {
+ srcPoint.y = 0;
+
+ if(ScanLines <= StartScan)
+ {
+ ScanLines = 1;
+ SURFACE_ShareUnlockSurface(psurfDest);
+ GreDeleteObject(hBmpDest);
+ goto done;
+ }
+
+ ScanLines -= StartScan;
+ }
+ else
+ {
+ srcPoint.y = StartScan;
+ }
EXLATEOBJ_vInitialize(&exlo, psurf->ppal, psurfDest->ppal, 0xffffff,
0xffffff, 0);