diff options
author | smatz <smatz@openttd.org> | 2009-10-30 23:58:40 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-10-30 23:58:40 +0000 |
commit | fe78cd77bb2735ce4802b4603249e14750a959b3 (patch) | |
tree | fb42180030743a3d6b02b33071045c851bf3666f /src | |
parent | 86c40a17a95610fda7631bc203ee54c3f3ab8b93 (diff) | |
download | openttd-fe78cd77bb2735ce4802b4603249e14750a959b3.tar.xz |
(svn r17910) -Fix: 32bpp BMP screenshots were broken when screen width wasn't multiple of 4
Diffstat (limited to 'src')
-rw-r--r-- | src/screenshot.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 0fa309d11..200151b70 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -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; |