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 - SDL_SetGamma ignores small gamma values
Summary: SDL_SetGamma ignores small gamma values
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.14
Hardware: All Windows (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-26 07:18 UTC by R.Lamprecht
Modified: 2011-02-16 04:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.