Bug 218892 - Can't set the the gamma bigger than 1.0f
Summary: Can't set the the gamma bigger than 1.0f
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: SDL (Show other bugs)
(Show other bugs)
Version: 6
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-08 00:53 UTC by Chien-Chung Yeh
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Chien-Chung Yeh 2006-12-08 00:53:27 UTC
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 14:48:41 UTC
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.