mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Fix hw gamma in -sgl.
This commit is contained in:
parent
1b40eb715a
commit
9ff89960f2
2 changed files with 13 additions and 1 deletions
|
@ -163,7 +163,6 @@ VID_Init (unsigned char *palette)
|
|||
Sys_Error ("VID: Couldn't set video mode: %s\n", SDL_GetError ());
|
||||
VID_InitGamma (palette);
|
||||
VID_SetPalette (palette);
|
||||
// VID_SetCaption (""); // FIXME?
|
||||
|
||||
// now know everything we need to know about the buffer
|
||||
VGA_width = vid.conwidth = vid.width;
|
||||
|
|
|
@ -75,6 +75,17 @@ extern void VID_Init8bitPalette (void);
|
|||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
VID_SDL_GammaCheck (void)
|
||||
{
|
||||
Uint16 redtable[256], greentable[256], bluetable[256];
|
||||
|
||||
if (SDL_GetGammaRamp(redtable, greentable, bluetable) < 0)
|
||||
vid_gamma_avail = false;
|
||||
else
|
||||
vid_gamma_avail = true;
|
||||
}
|
||||
|
||||
void
|
||||
VID_Shutdown (void)
|
||||
{
|
||||
|
@ -203,6 +214,8 @@ VID_Init (unsigned char *palette)
|
|||
|
||||
GL_Init ();
|
||||
|
||||
VID_SDL_GammaCheck ();
|
||||
|
||||
GL_CheckBrightness (palette);
|
||||
VID_InitGamma (palette);
|
||||
VID_SetPalette (palette);
|
||||
|
|
Loading…
Reference in a new issue