mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 12:44:34 +03:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user