aboutsummaryrefslogtreecommitdiffstats
path: root/src/gamma-quartz.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gamma-quartz.c')
-rw-r--r--src/gamma-quartz.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gamma-quartz.c b/src/gamma-quartz.c
index f28955f..4eeac4d 100644
--- a/src/gamma-quartz.c
+++ b/src/gamma-quartz.c
@@ -96,6 +96,14 @@ quartz_set_temperature_for_display(CGDirectDisplayID display,
float *gamma_g = &gamma_ramps[1*ramp_size];
float *gamma_b = &gamma_ramps[2*ramp_size];
+ /* Initialize gamma ramps to pure state */
+ for (int i = 0; i < ramp_size; i++) {
+ float value = (double)i/ramp_size;
+ gamma_r[i] = value;
+ gamma_g[i] = value;
+ gamma_b[i] = value;
+ }
+
colorramp_fill_float(gamma_r, gamma_g, gamma_b, ramp_size,
setting);