Merge pull request #482 from 0lvin/brightnes_fixes

Add force redraw on change gamma
This commit is contained in:
Yamagi 2019-11-08 19:12:04 +01:00 committed by GitHub
commit 294ed35067
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1406,6 +1406,10 @@ RE_BeginFrame( float camera_separation )
{
Draw_BuildGammaTable();
R_GammaCorrectAndSetPalette((const unsigned char * )d_8to24table);
// we need redraw everything
VID_WholeDamageBuffer();
// and backbuffer should be zeroed
memset(swap_buffers + ((swap_current + 1)&1), 0, vid.height * vid.width * sizeof(pixel_t));
vid_gamma->modified = false;
sw_overbrightbits->modified = false;