From 601ad61e7ddd5a79a0c650ff617b617470fafe07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Wed, 25 Nov 2020 12:46:00 +0100 Subject: Unify naming of first argument of Platform_getBattery Use percent throughout --- freebsd/Platform.c | 6 +++--- freebsd/Platform.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'freebsd') diff --git a/freebsd/Platform.c b/freebsd/Platform.c index 89430814..506cafb4 100644 --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -357,13 +357,13 @@ bool Platform_getNetworkIO(unsigned long int* bytesReceived, return true; } -void Platform_getBattery(double* level, ACPresence* isOnAC) { +void Platform_getBattery(double* percent, ACPresence* isOnAC) { int life; size_t life_len = sizeof(life); if (sysctlbyname("hw.acpi.battery.life", &life, &life_len, NULL, 0) == -1) - *level = NAN; + *percent = NAN; else - *level = life; + *percent = life; int acline; size_t acline_len = sizeof(acline); diff --git a/freebsd/Platform.h b/freebsd/Platform.h index 983f943a..5b3b0195 100644 --- a/freebsd/Platform.h +++ b/freebsd/Platform.h @@ -66,6 +66,6 @@ bool Platform_getNetworkIO(unsigned long int* bytesReceived, unsigned long int* bytesTransmitted, unsigned long int* packetsTransmitted); -void Platform_getBattery(double* level, ACPresence* isOnAC); +void Platform_getBattery(double* percent, ACPresence* isOnAC); #endif -- cgit v1.2.3