diff options
Diffstat (limited to 'src/gamma-randr.c')
-rw-r--r-- | src/gamma-randr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gamma-randr.c b/src/gamma-randr.c index 4f6b0f0..5ef7a4f 100644 --- a/src/gamma-randr.c +++ b/src/gamma-randr.c @@ -327,6 +327,14 @@ randr_set_temperature_for_crtc(randr_state_t *state, int crtc_num, uint16_t *gamma_g = &gamma_ramps[1*ramp_size]; uint16_t *gamma_b = &gamma_ramps[2*ramp_size]; + /* Initialize gamma ramps to pure state */ + for (int i = 0; i < ramp_size; i++) { + uint16_t value = (double)i/ramp_size * (UINT16_MAX+1); + gamma_r[i] = value; + gamma_g[i] = value; + gamma_b[i] = value; + } + colorramp_fill(gamma_r, gamma_g, gamma_b, ramp_size, setting); |