Probably fix sheared PNG screenshots.

We shouldn't assume a particular bytes-per-line value and use ylookup[] instead.
Specifically, windowed modes on Windows use a frame buffer that always has odd
x dimension.

git-svn-id: https://svn.eduke32.com/eduke32@2505 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-20 18:32:16 +00:00
parent 51398ca749
commit ea9abc58c9

View file

@ -15857,9 +15857,8 @@ static int32_t screencapture_png(const char *filename, char inverseit, const cha
rowptrs = (png_bytepp)png_malloc(png_ptr, ydim*sizeof(png_bytep));
if (!palette)
{
int32_t k = xdim*(1+2*!palette);
for (i=0; i<ydim; i++)
rowptrs[i] = &buf[k*(ydim-i-1)];
rowptrs[i] = &buf[ylookup[ydim-i-1]];
}
else
{