This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 218892 - Can't set the the gamma bigger than 1.0f
Can't set the the gamma bigger than 1.0f
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: SDL (Show other bugs)
6
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-07 19:53 EST by Chien-Chung Yeh
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-02-12 09:48:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Chien-Chung Yeh 2006-12-07 19:53:27 EST
Description of problem:
Play games, ex. "cube"(http://cube.sourceforge.net/), by changing "gamma" bigger than "1.0f", it 
does not work.

Version-Release number of selected component (if applicable):
1.2.10-8

How reproducible:
Always

Steps to Reproduce:
1. $ cube
2. Press "Esc", click "tweaking", click "tweak gamma" (50, 60, ...., 100, ..., 140, 150)
3.
  
Actual results:
When gamma < 1.0f ( ex. "tweak gamma" select "50" ,gamma=50/100=0.5f ), it works. But when 
gamma > 1.0f, nothing happens. 

Expected results:
When gamma > 1.0f, it will brighter than gamma == 1.0f.

Additional info:
I tried the following patch, it works.
--- SDL-1.2.10/src/video/SDL_gamma.c.00 2006-05-01 16:02:48.000000000 +0800
+++ SDL-1.2.10/src/video/SDL_gamma.c    2006-12-08 08:22:47.000000000 +0800
@@ -50,7 +50,7 @@ static void CalculateGammaRamp(float gam
                return;
        } else
        /* 1.0 gamma is identity */
-       if ( gamma >= 1.0f ) {
+       if ( gamma == 1.0f ) {
                for ( i=0; i<256; ++i ) {
                        ramp[i] = (i << 8) | i;
                }
Comment 1 Hans de Goede 2007-02-12 09:48:41 EST
This is an API change and as such should be requested upstream, subscribe to:
http://listserver.dreamhost.com/listinfo.cgi/sdl-libsdl.org

And request is there. Closing with a resolution of upstream.

Note You need to log in before you can comment on or make changes to this bug.