xrandr: fix brightness to prevent gamma to overflow and to allow 0
authorÉric Piel <eric.piel@tremplin-utc.net>
Wed, 6 Jan 2010 13:42:15 +0000 (14:42 +0100)
committerMatthias Hopf <mhopf@suse.de>
Tue, 12 Jan 2010 12:07:54 +0000 (13:07 +0100)
commitac6606d8da914610446c5327813798bfbba4d6c2
tree6fc0339d0bced0b786e28e59f3eb2a95682aa533
parentccb3f8a42b25819cd1812f179544b52c2f03d1aa
xrandr: fix brightness to prevent gamma to overflow and to allow 0

With the new brightness option, gamma would overflow with values > 1,
leading to rainbow looking screen.

In addition, have the brightness by default to 1, so that specifying 0
actually does the expected behaviour of leading to a black screen.

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Matthias Hopf <mhopf@suse.de>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
xrandr.c