Unify naming of first argument of Platform_getBattery

Use percent throughout
This commit is contained in:
Christian Göttsche
2020-11-25 12:46:00 +01:00
parent a3221f3677
commit 601ad61e7d
11 changed files with 36 additions and 36 deletions

View File

@ -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);