1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-09 00:33:33 -05:00

Added command line option --pause-on-battery and renamed config option.

This commit is contained in:
XMRig
2020-07-23 15:45:01 +07:00
parent 6484bbb716
commit 32e9b7e34a
10 changed files with 32 additions and 25 deletions

View File

@@ -551,8 +551,8 @@ void xmrig::Miner::onTimer(const Timer *)
d_ptr->ticks++;
if (!d_ptr->controller->config()->mineOnBattery()) {
const bool battery_power = xmrig::Platform::isOnBatteryPower();
if (d_ptr->controller->config()->isPauseOnBattery()) {
const bool battery_power = Platform::isOnBatteryPower();
if (battery_power && d_ptr->enabled) {
LOG_INFO("%s " YELLOW_BOLD("on battery power"), Tags::miner());
d_ptr->battery_power = true;