From 7c60912cb94b5d4c2598c1c628e074a6c8952fd5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 23 May 2013 20:30:26 -0400 Subject: [PATCH] compositor: Make backlight_current int32_t to avoid unsigned overflow Backlight brightness was wrapping around when decrementing from 0. --- src/compositor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor.h b/src/compositor.h index 06476cc..a4292d2 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -197,7 +197,7 @@ struct weston_output { int (*switch_mode)(struct weston_output *output, struct weston_mode *mode); /* backlight values are on 0-255 range, where higher is brighter */ - uint32_t backlight_current; + int32_t backlight_current; void (*set_backlight)(struct weston_output *output, uint32_t value); void (*set_dpms)(struct weston_output *output, enum dpms_enum level); -- 2.7.4