[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeutils/klaptopdaemon
From: Volker Krause <volker.krause () rwth-aachen ! de>
Date: 2004-04-12 13:52:37
Message-ID: 20040412135237.DB8DB993E () office ! kde ! org
[Download RAW message or body]
CVS commit by vkrause:
ACPI battery handling: Don't return a remaining time value if
- there is no battery present
- we don't have a (dis-)charging rate
This should help with bug #67427.
CCMAIL: 67427@bugs.kde.org
M +5 -3 portable.cpp 1.87
--- kdeutils/klaptopdaemon/portable.cpp #1.86:1.87
@@ -511,9 +511,11 @@ acpi_read(apm_info *ap)
rate += saved_rate[i];
rate = (rate+2*saved_rate[0])/(nrates+2); // weight it slighly
- ap->battery_time = ((rate==0||part==0)?0 : 60*part/rate);
+ ap->battery_time = (rate==0 ? -1 : 60*part/rate);
}
ap->battery_percentage = (total==0?0:100*part/total);
- if (!present)
+ if (!present) {
ap->battery_percentage = -1;
+ ap->battery_time = -1;
+ }
ap->apm_flags = 0;
return(ret);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic