SDL_SetGamma

View: New views
3 Messages — Rating Filter:   Alert me  

SDL_SetGamma

by Ronald Lamprecht :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: SDL_SetGamma

by Kenneth Bull :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/7 Ronald Lamprecht <R.Lamprecht@...>:
> 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/ )
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: SDL_SetGamma

by treellama :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Nov 7, 2009 at 10:11 AM, Ronald Lamprecht
<R.Lamprecht@...> 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.

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.

Gregory
_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org