mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Fix incorrect pitch size when creating savepic
This commit is contained in:
parent
a0d02f2bea
commit
a8614c89dd
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ void FGLRenderer::WriteSavePic ( FileWriter *file, int width, int height)
|
||||||
int numpixels = width * height;
|
int numpixels = width * height;
|
||||||
uint8_t* scr = (uint8_t*)Xmalloc(numpixels * 3);
|
uint8_t* scr = (uint8_t*)Xmalloc(numpixels * 3);
|
||||||
glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, scr);
|
glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, scr);
|
||||||
M_CreatePNG(file, scr + ((height - 1) * width), nullptr, SS_RGB, width, height, -width, vid_gamma);
|
M_CreatePNG(file, scr + ((height - 1) * width * 3), nullptr, SS_RGB, width, height, -width * 3, vid_gamma);
|
||||||
Xfree(scr);
|
Xfree(scr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue