SDL_SetGamma

Hi,

just made some experiments with SDL_SetGamma on Windows with SDL 1.2.14
with the following results:

float gamma = 0.2271;
int result = SDL_SetGamma(gamma, gamma, gamma);

does apply gamma to the screen, but just for gamma values greater equal
0.2271. Any value of 0.227 or less does not change the screen. This may
be a feature of Windows or a bug.

Of course I checked the return code, too. It seems to be totally
independent of the gamma value. Even on success it is always “-1” on the
first call. Just if the same gamma value is set twice, the second
SDL_SetGamma call returns “0”. This is obviously a bug in the Windows
SDL implementation.

The return code on Linux seems to be o.k…

Greets,

Ronald

2009/11/7 Ronald Lamprecht <R.Lamprecht at t-online.de>:

does apply gamma to the screen, but just for gamma values greater equal
0.2271. Any value of 0.227 or less does not change the screen. This may be a
feature of Windows or a bug.

Of course I checked the return code, too. It seems to be totally independent
of the gamma value. Even on success it is always “-1” on the first call.
Just if the same gamma value is set twice, the second SDL_SetGamma call
returns “0”. This is obviously a bug in the Windows SDL implementation.

Have you submitted a bug report?
( http://bugzilla.libsdl.org/ )

The gamma ramps work this way, too. I remember reading somewhere that
DIB won’t let you black the screen all the way, I guess they think
that is a feature. It’s very annoying.

If you use fullscreen and the DirectX driver, it will work.

GregoryOn Sat, Nov 7, 2009 at 10:11 AM, Ronald Lamprecht <R.Lamprecht at t-online.de> wrote:

Hi,

just made some experiments with SDL_SetGamma on Windows with SDL 1.2.14 with
the following results:

float gamma = 0.2271;
int result = SDL_SetGamma(gamma, gamma, gamma);

does apply gamma to the screen, but just for gamma values greater equal
0.2271. Any value of 0.227 or less does not change the screen. This may be a
feature of Windows or a bug.