Merge individual Battery.[ch] files into Platform.[ch]

Consistent with everything else involving platform-specific
calls from core htop code.
This commit is contained in:
Nathan Scott
2020-11-17 18:12:38 +11:00
parent e3af8d0d08
commit ea9622b8c9
29 changed files with 515 additions and 693 deletions

View File

@ -11,7 +11,7 @@ This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
#include <math.h>
#include "Battery.h"
#include "Platform.h"
#include "CRT.h"
#include "Object.h"
#include "XUtils.h"
@ -25,7 +25,7 @@ static void BatteryMeter_updateValues(Meter* this, char* buffer, int len) {
ACPresence isOnAC;
double percent;
Battery_getData(&percent, &isOnAC);
Platform_getBattery(&percent, &isOnAC);
if (isnan(percent)) {
this->values[0] = NAN;