From 43d31f7c3ab8c06582e081c9efe2b1a2b1c8a83f Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sun, 25 Oct 2009 21:48:48 +0000 Subject: [PATCH] * (bug #4316) Hack to work around suspected driver bug (Lakitu7) --- code/sdl/sdl_glimp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c index 25d1ca4e..00394974 100644 --- a/code/sdl/sdl_glimp.c +++ b/code/sdl/sdl_glimp.c @@ -717,7 +717,13 @@ success: // This values force the UI to disable driver selection glConfig.driverType = GLDRV_ICD; glConfig.hardwareType = GLHW_GENERIC; - glConfig.deviceSupportsGamma = !!( SDL_SetGamma( 1.0f, 1.0f, 1.0f ) >= 0 ); + glConfig.deviceSupportsGamma = SDL_SetGamma( 1.0f, 1.0f, 1.0f ) >= 0; + + // Mysteriously, if you use an NVidia graphics card and multiple monitors, + // SDL_SetGamma will incorrectly return false... the first time; ask + // again and you get the correct answer. This is a suspected driver bug, see + // http://bugzilla.icculus.org/show_bug.cgi?id=4316 + glConfig.deviceSupportsGamma = SDL_SetGamma( 1.0f, 1.0f, 1.0f ) >= 0; // get our config strings Q_strncpyz( glConfig.vendor_string, (char *) qglGetString (GL_VENDOR), sizeof( glConfig.vendor_string ) );