mirror of https://github.com/xzeldon/htop.git
netbsd: If at least one AC adapter is connected, keep its state.
This commit is contained in:
parent
93ca5af953
commit
c85aafa608
|
@ -410,7 +410,7 @@ void Platform_getBattery(double* percent, ACPresence* isOnAC) {
|
|||
totalCapacity += maxCharge;
|
||||
}
|
||||
|
||||
if (isACAdapter) {
|
||||
if (isACAdapter && *isOnAC != AC_PRESENT) {
|
||||
*isOnAC = isConnected ? AC_PRESENT : AC_ABSENT;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue