mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-24 15:15:44 +00:00
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
Block a user