aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamarque Vieira Souza <lamarque@gmail.com>2011-01-27 23:05:29 (GMT)
committerLamarque Vieira Souza <lamarque@gmail.com>2011-01-27 23:05:29 (GMT)
commit57a927ff69f5b1673e441c87ac59550f23ac3594 (patch)
treefa45d511a94c2650e459358bc1667dc7c99e2ace
parent2f26c2ac305cb5b739899a48288f521308f2129d (diff)
Backport r1217574 by lvsouza from trunk to the 4.6 branch:
Rounds value instead of truncating it. This fix a problem with increasing brightness key not working sometimes. CCBUG: 264534 svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1217581
Notes
Notes: Backport-of: 7dd77e4d71bc0d1a32c823e6ac8909f62362bbfd
-rw-r--r--powerdevil/daemon/backends/upower/xrandrbrightness.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/powerdevil/daemon/backends/upower/xrandrbrightness.cpp b/powerdevil/daemon/backends/upower/xrandrbrightness.cpp
index f558eea..0077fe9 100644
--- a/powerdevil/daemon/backends/upower/xrandrbrightness.cpp
+++ b/powerdevil/daemon/backends/upower/xrandrbrightness.cpp
@@ -131,7 +131,7 @@ void XRandrBrightness::setBrightness(float brightness)
// FIXME for now just set the first output's value
double value = min + (brightness * (max - min) / 100);
- backlight_set(output, (long) value);
+ backlight_set(output, (long) (value + 0.5));
}
XFree(info);
}