diff options
Diffstat (limited to 'xorg-server/hw/xfree86/modes')
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86RandR12.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c index a773c34c6..aca0734e0 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.c +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c @@ -1679,11 +1679,11 @@ gamma_to_ramp(float gamma, CARD16 *ramp, int size) for (i = 0; i < size; i++) { if (gamma == 1.0) - ramp[i] = i << 8; + ramp[i] = i | i << 8; else ramp[i] = (CARD16) (pow((double) i / (double) (size - 1), 1. / gamma) - * (double) (size - 1) * 256); + * (double) (size - 1) * 257); } } |