diff --git a/qw/source/vid_sdl.c b/qw/source/vid_sdl.c index aac5bfa96..a2539b13e 100644 --- a/qw/source/vid_sdl.c +++ b/qw/source/vid_sdl.c @@ -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; diff --git a/qw/source/vid_sgl.c b/qw/source/vid_sgl.c index 7f64a064e..329f61218 100644 --- a/qw/source/vid_sgl.c +++ b/qw/source/vid_sgl.c @@ -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);