mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-08 00:15:04 -05:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user