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
No known key found for this signature in database
GPG key ID: 446A53638BE94409
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;