From c85aafa608c89248aed0088ac1b7b282ea7b0c75 Mon Sep 17 00:00:00 2001 From: nia Date: Tue, 27 Jul 2021 10:30:56 +0200 Subject: netbsd: If at least one AC adapter is connected, keep its state. --- netbsd/Platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- cgit v1.2.3