Fixed overbright screenshots with hardware gamma off

When render buffers are used to apply gamma/brightness/contrast screenshots should not use PNG gamma correction
This commit is contained in:
alexey.lysiuk 2017-12-06 10:59:20 +02:00
commit 5162e7162e
13 changed files with 29 additions and 21 deletions

View file

@ -225,7 +225,7 @@ void FSoftwareRenderer::WriteSavePic (player_t *player, FileWriter *file, int wi
r_viewwindow = mScene.MainThread()->Viewport->viewwindow;
}
screen->GetFlashedPalette (palette);
M_CreatePNG (file, pic->GetBuffer(), palette, SS_PAL, width, height, pic->GetPitch());
M_CreatePNG (file, pic->GetBuffer(), palette, SS_PAL, width, height, pic->GetPitch(), Gamma);
pic->Unlock ();
delete pic;
}
@ -399,4 +399,4 @@ uint32_t FSoftwareRenderer::GetCaps()
FlagSet |= RFF_COLORMAP;
return (uint32_t)FlagSet;
}
}