From 9b8711d2e1548675ad957f2602bff154e5690e61 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 19 Jan 2013 21:39:35 +0000 Subject: [PATCH] Fix wacky patch for r_ignorehwgamma --- code/sdl/sdl_glimp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c index 51ea9a7b..30f84ee6 100644 --- a/code/sdl/sdl_glimp.c +++ b/code/sdl/sdl_glimp.c @@ -770,13 +770,8 @@ success: glConfig.hardwareType = GLHW_GENERIC; // Only using SDL_SetWindowBrightness to determine if hardware gamma is supported - glConfig.deviceSupportsGamma = SDL_SetWindowBrightness( SDL_window, 1.0f ) >= 0; - - if ( -1 == r_ignorehwgamma->integer) - glConfig.deviceSupportsGamma = 1; - - if ( 1 == r_ignorehwgamma->integer) - glConfig.deviceSupportsGamma = 0; + glConfig.deviceSupportsGamma = !r_ignorehwgamma->integer && + SDL_SetWindowBrightness( SDL_window, 1.0f ) >= 0; // get our config strings Q_strncpyz( glConfig.vendor_string, (char *) qglGetString (GL_VENDOR), sizeof( glConfig.vendor_string ) );