From c291361c5f5d0db26e8f7091fd55a31707fde390 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sun, 3 Mar 2019 18:03:18 +1300 Subject: Rewind brightness file after writing Fixes bug where only the first brightness value would be used, and following ones would not be applied. --- clock-disp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/clock-disp.c b/clock-disp.c index 8aa4fc3..d7986b9 100644 --- a/clock-disp.c +++ b/clock-disp.c @@ -210,6 +210,7 @@ void *read_stats(void* brightness_f_p) if (fwrite(buffer, strlen(buffer), 1, brightness_f) != strlen(buffer)) { perror("fwrite"); } + rewind(brightness_f); } } -- cgit v1.1