Added Windows taskbar icon colors

- Red when there's no connection to any pool
- Yellow when mining is paused
- No color during normal mining
This commit is contained in:
SChernykh 2021-09-20 17:29:04 +02:00
parent 76cd83edb2
commit 387320ad6d
4 changed files with 185 additions and 0 deletions

View file

@ -22,6 +22,7 @@
#include "core/Miner.h"
#include "core/Taskbar.h"
#include "3rdparty/rapidjson/document.h"
#include "backend/common/Hashrate.h"
#include "backend/cpu/Cpu.h"
@ -348,6 +349,8 @@ public:
String userJobId;
Timer *timer = nullptr;
uint64_t ticks = 0;
Taskbar m_taskbar;
};
@ -475,6 +478,7 @@ void xmrig::Miner::execCommand(char command)
void xmrig::Miner::pause()
{
d_ptr->active = false;
d_ptr->m_taskbar.setActive(false);
Nonce::pause(true);
Nonce::touch();
@ -494,6 +498,7 @@ void xmrig::Miner::setEnabled(bool enabled)
}
d_ptr->enabled = enabled;
d_ptr->m_taskbar.setEnabled(enabled);
if (enabled) {
LOG_INFO("%s " GREEN_BOLD("resumed"), Tags::miner());
@ -551,6 +556,7 @@ void xmrig::Miner::setJob(const Job &job, bool donate)
mutex.unlock();
d_ptr->active = true;
d_ptr->m_taskbar.setActive(true);
if (ready) {
d_ptr->handleJobChange();