Give config gamma as double to set_temperature

The gamma argument to set_temperature was incorrectly typed as an int,
causing unfortunate rounding.
master
Kenny Levinsen 2021-01-29 16:39:06 +01:00
parent bcbca9e065
commit 93d7d01bad
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -491,7 +491,7 @@ static void fill_gamma_table(uint16_t *table, uint32_t ramp_size, double rw,
} }
} }
static void set_temperature(struct wl_list *outputs, int temp, int gamma) { static void set_temperature(struct wl_list *outputs, int temp, double gamma) {
double rw, gw, bw; double rw, gw, bw;
calc_whitepoint(temp, &rw, &gw, &bw); calc_whitepoint(temp, &rw, &gw, &bw);
fprintf(stderr, "setting temperature to %d K\n", temp); fprintf(stderr, "setting temperature to %d K\n", temp);