diff options
author | nia <nia@NetBSD.org> | 2021-07-27 10:30:56 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-08-05 10:47:14 +0200 |
commit | c85aafa608c89248aed0088ac1b7b282ea7b0c75 (patch) | |
tree | 9f2f100562942fbb56ebbd4c9521321a0c1fc5af /netbsd | |
parent | 93ca5af953a872eb24faf2cc6a6a7c7671e19d7d (diff) |
netbsd: If at least one AC adapter is connected, keep its state.
Diffstat (limited to 'netbsd')
-rw-r--r-- | netbsd/Platform.c | 2 |
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; } } |