summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornia <nia@NetBSD.org>2021-07-27 10:30:56 +0200
committerBenBE <BenBE@geshi.org>2021-08-05 10:47:14 +0200
commitc85aafa608c89248aed0088ac1b7b282ea7b0c75 (patch)
tree9f2f100562942fbb56ebbd4c9521321a0c1fc5af
parent93ca5af953a872eb24faf2cc6a6a7c7671e19d7d (diff)
netbsd: If at least one AC adapter is connected, keep its state.
-rw-r--r--netbsd/Platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/netbsd/Platform.c b/netbsd/Platform.c
index b7364926..b34a6607 100644
--- a/netbsd/Platform.c
+++ b/netbsd/Platform.c
@@ -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;
}
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy