comparison src/video/SDL_gamma.c @ 1869:65800e7f7146

Date: Fri, 9 Jun 2006 11:35:23 +0300 From: "Janne Junnila" Subject: [SDL] SDL_SetGamma bug You can't set the the gamma 'brighter' than 1.0. There's a patch attached.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 20 Jun 2006 06:50:42 +0000
parents 97d0966f4bf7
children c121d94672cb a1b03ba2fcd0
comparison
equal deleted inserted replaced
1868:c8f42ed8805e 1869:65800e7f7146
48 ramp[i] = 0; 48 ramp[i] = 0;
49 } 49 }
50 return; 50 return;
51 } else 51 } else
52 /* 1.0 gamma is identity */ 52 /* 1.0 gamma is identity */
53 if ( gamma >= 1.0f ) { 53 if ( gamma == 1.0f ) {
54 for ( i=0; i<256; ++i ) { 54 for ( i=0; i<256; ++i ) {
55 ramp[i] = (i << 8) | i; 55 ramp[i] = (i << 8) | i;
56 } 56 }
57 return; 57 return;
58 } else 58 } else