mirror of
https://github.com/xmrig/xmrig.git
synced 2024-10-30 13:07:46 +00:00
Merge pull request #2122 from SChernykh/dev
Fixed pause logic when both pause on battery and user activity are en…
This commit is contained in:
commit
31a5d05dc1
1 changed files with 3 additions and 1 deletions
|
@ -354,6 +354,7 @@ public:
|
|||
bool battery_power = false;
|
||||
bool user_active = false;
|
||||
bool enabled = true;
|
||||
int32_t auto_pause = 0;
|
||||
bool reset = true;
|
||||
Controller *controller;
|
||||
Job job;
|
||||
|
@ -635,7 +636,8 @@ void xmrig::Miner::onTimer(const Timer *)
|
|||
LOG_INFO("%s %s", Tags::miner(), pause ? pauseMessage : activeMessage);
|
||||
|
||||
state = pause;
|
||||
setEnabled(!pause);
|
||||
d_ptr->auto_pause += pause ? 1 : -1;
|
||||
setEnabled(d_ptr->auto_pause == 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue