[PATCH] xrandr: fix brightness to prevent gamma to overflow and to allow 0

Matthias Hopf mhopf at suse.de
Mon Jan 11 03:46:43 PST 2010


On Jan 10, 10 00:25:34 +0100, Eric Piel wrote:
> This fix the behaviour of brightness for 0 and values above 1. You can
> still can funky display with negative values so all is safe ;-)

Nice, but fmin() is unknown unless compiled as c99 source (which we
probably want to avoid).
I would suggest using

static inline double min (double x, double y)
{
  return x < y ? x : y;
}

instead.

Matthias

-- 
Matthias Hopf <mhopf at suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat at mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de


More information about the xorg-devel mailing list