From 51e4f7930ae5e30f3d7a4a229c479afcab53398a Mon Sep 17 00:00:00 2001 From: tma Date: Sun, 25 Oct 2009 21:48:48 +0000 Subject: * (bug #4316) Hack to work around suspected driver bug (Lakitu7) git-svn-id: svn://svn.icculus.org/quake3/trunk@1704 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/sdl/sdl_glimp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'code') diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c index 25d1ca4..0039497 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 ) ); -- cgit v1.2.3