mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-07 16:05:05 -05:00
Compare commits
2 Commits
3b57c88cfc
...
a6bb5bcf8b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6bb5bcf8b | ||
|
|
5ac6d438fa |
@@ -169,6 +169,12 @@ bool xmrig::Platform::isOnBatteryPower()
|
|||||||
return (status == "Discharging");
|
return (status == "Discharging");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
std::ifstream f("/sys/class/power_supply/macsmc-battery/status");
|
||||||
|
if (f.is_open()) {
|
||||||
|
std::string status;
|
||||||
|
f >> status;
|
||||||
|
return (status == "Discharging");
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user