mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
* use the Win2k gamma clamp thing on Vista too (raynorpat)
This commit is contained in:
parent
c6249fcc25
commit
ddc848dced
1 changed files with 4 additions and 4 deletions
|
@ -148,11 +148,11 @@ void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned
|
||||||
table[2][i] = ( ( ( unsigned short ) blue[i] ) << 8 ) | blue[i];
|
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);
|
vinfo.dwOSVersionInfoSize = sizeof(vinfo);
|
||||||
GetVersionEx( &vinfo );
|
GetVersionEx( &vinfo );
|
||||||
if ( vinfo.dwMajorVersion == 5 && vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) {
|
if ( vinfo.dwMajorVersion >= 5 && vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) {
|
||||||
Com_DPrintf( "performing W2K gamma clamp.\n" );
|
Com_DPrintf( "performing gamma clamp.\n" );
|
||||||
for ( j = 0 ; j < 3 ; j++ ) {
|
for ( j = 0 ; j < 3 ; j++ ) {
|
||||||
for ( i = 0 ; i < 128 ; i++ ) {
|
for ( i = 0 ; i < 128 ; i++ ) {
|
||||||
if ( table[j][i] > ( (128+i) << 8 ) ) {
|
if ( table[j][i] > ( (128+i) << 8 ) ) {
|
||||||
|
@ -164,7 +164,7 @@ void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Com_DPrintf( "skipping W2K gamma clamp.\n" );
|
Com_DPrintf( "skipping gamma clamp.\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// enforce constantly increasing
|
// enforce constantly increasing
|
||||||
|
|
Loading…
Reference in a new issue