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

@ -329,12 +329,13 @@ void DCanvas::Dim (PalEntry color)
//
//==========================================================================
void DCanvas::GetScreenshotBuffer(const uint8_t *&buffer, int &pitch, ESSType &color_type)
void DCanvas::GetScreenshotBuffer(const uint8_t *&buffer, int &pitch, ESSType &color_type, float &gamma)
{
Lock(true);
buffer = GetBuffer();
pitch = IsBgra() ? GetPitch() * 4 : GetPitch();
color_type = IsBgra() ? SS_BGRA : SS_PAL;
gamma = Gamma;
}
//==========================================================================