- Timestamp:
- Jan 24, 2012, 11:47:23 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/winicon.cpp
r21916 r21951 163 163 colortablesize = 0; 164 164 165 // CreateDIBits expectes DWORD-aligned scan lines 166 bmpXor.bmWidthBytes = (bmpXor.bmWidthBytes + 3) / 4 * 4; 167 bmpAnd.bmWidthBytes = (bmpAnd.bmWidthBytes + 3) / 4 * 4; 168 165 169 if(bmpXor.bmBitsPixel <= 8) { 166 170 colortablesize = sizeof(RGBQUAD)*(1<<bmpXor.bmBitsPixel); … … 221 225 //recalculate the mask bitmap size 222 226 GetObjectA( hbmMask, sizeof(bmpAnd), &bmpAnd ); 223 sizeAnd = bmpAnd.bmHeight * bmpAnd.bmWidthBytes;227 sizeAnd = bmpAnd.bmHeight * (bmpAnd.bmWidthBytes + 3) / 4 * 4; 224 228 225 229 //query the 1bpp bitmap data … … 1160 1164 } 1161 1165 1166 // CreateDIBits expectes DWORD-aligned scan lines 1167 bmpXor.bmWidthBytes = (bmpXor.bmWidthBytes + 3) / 4 * 4; 1168 bmpAnd.bmWidthBytes = (bmpAnd.bmWidthBytes + 3) / 4 * 4; 1169 1162 1170 if(bmpXor.bmBitsPixel <= 8) { 1163 1171 colortablesize = sizeof(RGBQUAD)*(1<<bmpXor.bmBitsPixel);
Note:
See TracChangeset
for help on using the changeset viewer.