Previously, it was always rounded down, which meant that -dec X would result in a bigger change than -inc X for the same X if rounding took place.
Signed-off-by: Roman Donchenko <[email protected]> --- xbacklight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbacklight.c b/xbacklight.c index 2189095..c054d26 100644 --- a/xbacklight.c +++ b/xbacklight.c @@ -309,7 +309,7 @@ main (int argc, char **argv) cur = new; else cur += step; - backlight_set (conn, output, (long) cur); + backlight_set (conn, output, (long) (cur + 0.5)); xcb_flush (conn); usleep (total_time * 1000 / steps); } -- 1.8.1.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
