mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 13:31:07 +00:00
- fixed blinking frame after saving a game
Viewport was not reseted after creation of saved game thumbnail, so one junk frame was rendered right after saving a game https://forum.zdoom.org/viewtopic.php?t=60412
This commit is contained in:
parent
0187b0aa5b
commit
a0695cbb48
1 changed files with 2 additions and 0 deletions
|
@ -739,6 +739,8 @@ void GLSceneDrawer::WriteSavePic (player_t *player, FileWriter *file, int width,
|
|||
GLRenderer->CopyToBackbuffer(&bounds, false);
|
||||
glFlush();
|
||||
|
||||
screen->SetOutputViewport(nullptr);
|
||||
|
||||
uint8_t * scr = (uint8_t *)M_Malloc(width * height * 3);
|
||||
glReadPixels(0,0,width, height,GL_RGB,GL_UNSIGNED_BYTE,scr);
|
||||
M_CreatePNG (file, scr + ((height-1) * width * 3), NULL, SS_RGB, width, height, -width * 3, Gamma);
|
||||
|
|
Loading…
Reference in a new issue