From 93d7d01bad314d9ae1c0a45dc6c8e17fd6aad6ec Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Fri, 29 Jan 2021 16:39:06 +0100 Subject: [PATCH] Give config gamma as double to set_temperature The gamma argument to set_temperature was incorrectly typed as an int, causing unfortunate rounding. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 4c27d58..3f85a9f 100644 --- a/main.c +++ b/main.c @@ -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; calc_whitepoint(temp, &rw, &gw, &bw); fprintf(stderr, "setting temperature to %d K\n", temp);