summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tdepowersave.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tdepowersave.cpp b/src/tdepowersave.cpp
index 4db6039..2cbc837 100644
--- a/src/tdepowersave.cpp
+++ b/src/tdepowersave.cpp
@@ -2938,7 +2938,7 @@ int tdepowersave::brightnessGet() {
int retval = -1;
if (hwinfo->supportBrightness()) {
- retval = (int)(((float)hwinfo->getCurrentBrightnessLevel() / (float)hwinfo->getMaxBrightnessLevel()-1) * 100.0);
+ retval = (int)(100.0 * hwinfo->getCurrentBrightnessLevel() / hwinfo->getMaxBrightnessLevel());
}
kdDebugFuncOut(trace);