[quake3-commits] r2293 - trunk/code/sdl

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Jul 1 13:01:30 EDT 2012


Author: thilo
Date: 2012-07-01 13:01:30 -0400 (Sun, 01 Jul 2012)
New Revision: 2293

Modified:
   trunk/code/sdl/sdl_gamma.c
   trunk/code/sdl/sdl_glimp.c
Log:
r_ignorehwgamma 1 does not actually turn on software gamma (#5511) - patch by Serge Belyshev


Modified: trunk/code/sdl/sdl_gamma.c
===================================================================
--- trunk/code/sdl/sdl_gamma.c	2012-07-01 16:59:20 UTC (rev 2292)
+++ trunk/code/sdl/sdl_gamma.c	2012-07-01 17:01:30 UTC (rev 2293)
@@ -39,7 +39,7 @@
 	Uint16 table[3][256];
 	int i, j;
 
-	if( !glConfig.deviceSupportsGamma || r_ignorehwgamma->integer )
+	if( !glConfig.deviceSupportsGamma || r_ignorehwgamma->integer > 0 )
 		return;
 
 	for (i = 0; i < 256; i++)

Modified: trunk/code/sdl/sdl_glimp.c
===================================================================
--- trunk/code/sdl/sdl_glimp.c	2012-07-01 16:59:20 UTC (rev 2292)
+++ trunk/code/sdl/sdl_glimp.c	2012-07-01 17:01:30 UTC (rev 2293)
@@ -733,6 +733,12 @@
 	// http://bugzilla.icculus.org/show_bug.cgi?id=4316
 	glConfig.deviceSupportsGamma = SDL_SetGamma( 1.0f, 1.0f, 1.0f ) >= 0;
 
+	if ( -1 == r_ignorehwgamma->integer)
+		glConfig.deviceSupportsGamma = 1;
+
+	if ( 1 == r_ignorehwgamma->integer)
+		glConfig.deviceSupportsGamma = 0;
+
 	// get our config strings
 	Q_strncpyz( glConfig.vendor_string, (char *) qglGetString (GL_VENDOR), sizeof( glConfig.vendor_string ) );
 	Q_strncpyz( glConfig.renderer_string, (char *) qglGetString (GL_RENDERER), sizeof( glConfig.renderer_string ) );



More information about the quake3-commits mailing list