Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 449692

Summary: media-libs/libsdl-1.2.15 with >=x11-base/xorg-server-1.7 - cannot set gamma
Product: Gentoo Linux Reporter: Petr Pisar <petr.pisar>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH, UPSTREAM
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://bugzilla.libsdl.org/show_bug.cgi?id=1680
See Also: https://bugs.gentoo.org/show_bug.cgi?id=889412
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: SDL fix
SDL fix 2

Description Petr Pisar 2013-01-01 20:58:47 UTC
Created attachment 333968 [details, diff]
SDL fix

SDL_SetGamma() allows to change screen gamma. Problem is it has no effect since xorg-server-1.7 (almost three years back). Try to run any SDL application, games usually supports setting gamma, or compile test/testgamma.c demo from libsdl tar ball (run it and press Up or Down to change gamma value).

SDL supports two methods how to change gamma: Directly and changing color palette. SDL_SetGamma() prefers changing palette but this is broken in Xorg server, so it does not change colors neither signal failure. This is problem in Xorg, but it's not likely to be fixed. See <https://bugs.freedesktop.org/show_bug.cgi?id=27222> for more details.

Attached patch fixes this problem on SDL side. Tested with media-libs/libsdl-1.2.15-r2 and x11-base/xorg-server-1.13.1 on amd64.
Comment 1 Petr Pisar 2013-01-03 21:04:54 UTC
Created attachment 334240 [details, diff]
SDL fix 2

This patch removes unneeded SDL_ClearError() call in addition.
Comment 2 Petr Pisar 2013-01-04 17:19:02 UTC
Upstream bug report <http://bugzilla.libsdl.org/show_bug.cgi?id=1680>.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2013-05-10 06:23:10 UTC
in portage.  thanks for the bug report and patch.