(svn r17910) -Fix: 32bpp BMP screenshots were broken when screen width wasn't multiple of 4

This commit is contained in:
smatz 2009-10-30 23:58:40 +00:00
parent 6b76afbc5c
commit 3d177abb14

View File

@ -90,7 +90,8 @@ static bool MakeBmpImage(char *name, ScreenshotCallback *callb, void *userdata,
if (f == NULL) return false;
/* each scanline must be aligned on a 32bit boundary */
padw = Align(w, 4);
padw = w;
if (pixelformat == 8) padw = Align(padw, 4);
if (pixelformat == 8) pal_size = sizeof(RgbQuad) * 256;