We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 893

Summary: SDL_SetGamma ignores small gamma values
Product: SDL Reporter: R.Lamprecht
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.14   
Hardware: All   
OS: Windows (All)   

Description R.Lamprecht 2009-11-26 07:18:37 UTC
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..
Comment 1 Sam Lantinga 2011-02-16 04:41:14 UTC
The gamma API has been removed in SDL 1.3, due to lack of support on many platforms.