mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
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:
parent
51398ca749
commit
ea9abc58c9
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue