Fix hw gamma in -sgl.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-04-13 06:53:35 +00:00
parent 1b40eb715a
commit 9ff89960f2
2 changed files with 13 additions and 1 deletions

View file

@ -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;

View file

@ -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);