- Timestamp:
- Feb 16, 2000, 8:48:52 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/blit.cpp
r2802 r2808 1 /* $Id: blit.cpp,v 1. 5 2000-02-16 14:18:09sandervl Exp $ */1 /* $Id: blit.cpp,v 1.6 2000-02-16 19:48:52 sandervl Exp $ */ 2 2 3 3 /* … … 91 91 INT result, imgsize, palsize, height, width; 92 92 char *ptr; 93 ULONG compression = 0, iHeight ;93 ULONG compression = 0, iHeight, bmpsize; 94 94 WORD *newbits = 0; 95 95 … … 133 133 // EB: <<<- 134 134 135 //SvL: RP7's bitmap size is not correct; fix it here or else 136 // the blit is messed up in Open32 137 bmpsize = info->bmiHeader.biSizeImage; 138 if(info->bmiHeader.biSizeImage && info->bmiHeader.biSizeImage < imgsize) 139 { 140 ((BITMAPINFO *)info)->bmiHeader.biSizeImage = imgsize; 141 } 142 135 143 //SvL: Ignore BI_BITFIELDS type (SetDIBitsToDevice fails otherwise) 136 144 if(info->bmiHeader.biCompression == BI_BITFIELDS) { … … 139 147 ((BITMAPINFO *)info)->bmiHeader.biCompression = 0; 140 148 compression = BI_BITFIELDS; 149 141 150 if(*(bitfields+1) == 0x3E0) 142 151 {//RGB 555? … … 160 169 result = (result == TRUE) ? lines : 0; 161 170 162 dprintf(("GDI32: SetDIBitsToDevice hdc:%X xDest:%d yDest:%d, cx:%d, cy:%d, xSrc:%d, ySrc:%d, startscan:%d, lines:%d \nGDI32: bits :%X, info%X, coloruse:%d returned %d",171 dprintf(("GDI32: SetDIBitsToDevice hdc:%X xDest:%d yDest:%d, cx:%d, cy:%d, xSrc:%d, ySrc:%d, startscan:%d, lines:%d \nGDI32: bits 0x%X, info 0x%X, coloruse %d returned %d", 163 172 hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (LPVOID) bits, (PBITMAPINFO)info, coloruse, result)); 164 173 dprintf(("GDI32: SetDIBitsToDevice %d %d %d %d %x %d", info->bmiHeader.biWidth, info->bmiHeader.biHeight, info->bmiHeader.biPlanes, info->bmiHeader.biBitCount, info->bmiHeader.biCompression, info->bmiHeader.biSizeImage)); … … 169 178 } 170 179 ((BITMAPINFO *)info)->bmiHeader.biHeight = iHeight; 180 ((BITMAPINFO *)info)->bmiHeader.biSizeImage = bmpsize; 171 181 return result; 172 182
Note:
See TracChangeset
for help on using the changeset viewer.