r1047 - trunk/code/win32

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Mar 1 17:02:29 EST 2007


Author: tjw
Date: 2007-03-01 17:02:25 -0500 (Thu, 01 Mar 2007)
New Revision: 1047

Modified:
   trunk/code/win32/win_gamma.c
Log:
* use the Win2k gamma clamp thing on Vista too (raynorpat)


Modified: trunk/code/win32/win_gamma.c
===================================================================
--- trunk/code/win32/win_gamma.c	2007-02-16 23:50:37 UTC (rev 1046)
+++ trunk/code/win32/win_gamma.c	2007-03-01 22:02:25 UTC (rev 1047)
@@ -148,11 +148,11 @@
 		table[2][i] = ( ( ( unsigned short ) blue[i] ) << 8 ) | blue[i];
 	}
 
-	// Win2K puts this odd restriction on gamma ramps...
+	// Win2K and newer put this odd restriction on gamma ramps...
 	vinfo.dwOSVersionInfoSize = sizeof(vinfo);
 	GetVersionEx( &vinfo );
-	if ( vinfo.dwMajorVersion == 5 && vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) {
-		Com_DPrintf( "performing W2K gamma clamp.\n" );
+	if ( vinfo.dwMajorVersion >= 5 && vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) {
+		Com_DPrintf( "performing gamma clamp.\n" );
 		for ( j = 0 ; j < 3 ; j++ ) {
 			for ( i = 0 ; i < 128 ; i++ ) {
 				if ( table[j][i] > ( (128+i) << 8 ) ) {
@@ -164,7 +164,7 @@
 			}
 		}
 	} else {
-		Com_DPrintf( "skipping W2K gamma clamp.\n" );
+		Com_DPrintf( "skipping gamma clamp.\n" );
 	}
 
 	// enforce constantly increasing




More information about the quake3-commits mailing list