| Newsgroups |
gmane.comp.emulators.winex.cvs |
| Message-ID |
<[email protected]> |
Subject: winex/objects dib.c,1.10,1.11Update of /var/lib/cvsd/cvsroot/winex/objects
In directory agravaine:/tmp/cvs-serv30349/objects
Modified Files:
dib.c
Log Message:
Fix incorrect GetDIBits behaviour in the case where a dest buffer isn't
provided. In that case, we must return the height of the bitmap.
Index: dib.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/objects/dib.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- dib.c 20 Jan 2005 16:01:38 -0000 1.10
+++ dib.c 30 Mar 2007 15:49:52 -0000 1.11
@@ -467,6 +467,9 @@
PALETTEOBJ * palette;
int i;
+ TRACE("hdc = %p; hbitmap = %p; startscan = %d; lines = %d; bits = %p; info = %p; coloruse = %d\n",
+ hdc, hbitmap, startscan, lines, bits, info, coloruse);
+
if (!info) return 0;
if (!(dc = DC_GetDCUpdate( hdc ))) return 0;
if (!(bmp = (BITMAPOBJ *)GDI_GetObjPtr( hbitmap, BITMAP_MAGIC )))
@@ -765,11 +768,16 @@
info->bmiHeader.biHeight,
info->bmiHeader.biBitCount );
}
+
+ /* MSDN: If bits is NULL, return the height of the bitmap for Win95;
+ * For NT/Win2k/XP, return non-zero */
+ if (!bits)
+ lines = info->bmiHeader.biHeight;
}
- TRACE("biSizeImage = %ld, biWidth = %ld, biHeight = %ld\n",
+ TRACE("biSizeImage = %ld, biWidth = %ld, biHeight = %ld; lines = %ld\n",
info->bmiHeader.biSizeImage, info->bmiHeader.biWidth,
- info->bmiHeader.biHeight);
+ info->bmiHeader.biHeight, lines);
GDI_ReleaseObj( hdc );
GDI_ReleaseObj( hbitmap );