summaryrefslogtreecommitdiff
path: root/hw/xfree86/modes/xf86RandR12.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/modes/xf86RandR12.c')
-rw-r--r--hw/xfree86/modes/xf86RandR12.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index f941a3b4a..c71cfe5c3 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1703,7 +1703,7 @@ gamma_to_ramp(float gamma, CARD16 *ramp, int size)
if (gamma == 1.0)
ramp[i] = i << 8;
else
- ramp[i] = (CARD16)(pow((double)i / (double)(size - 1), gamma)
+ ramp[i] = (CARD16)(pow((double)i / (double)(size - 1), 1. / gamma)
* (double)(size - 1) * 256);
}
}