mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-25 13:09:28 +00:00
Fix color issues.
This commit is contained in:
parent
b98d44ce10
commit
dfe20e116b
2 changed files with 12 additions and 12 deletions
|
@ -80,16 +80,16 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define RED_BOLD(x) "\e[1;31m" x "\e[0m"
|
#define RED_BOLD(x) "\x1B[1;31m" x "\x1B[0m"
|
||||||
#define RED(x) "\e[0;31m" x "\e[0m"
|
#define RED(x) "\x1B[0;31m" x "\x1B[0m"
|
||||||
#define GREEN_BOLD(x) "\e[1;32m" x "\e[0m"
|
#define GREEN_BOLD(x) "\x1B[1;32m" x "\x1B[0m"
|
||||||
#define GREEN(x) "\e[0;32m" x "\e[0m"
|
#define GREEN(x) "\x1B[0;32m" x "\x1B[0m"
|
||||||
#define MAGENTA_BOLD(x) "\e[1;35m" x "\e[0m"
|
#define MAGENTA_BOLD(x) "\x1B[1;35m" x "\x1B[0m"
|
||||||
#define MAGENTA(x) "\e[0;35m" x "\e[0m"
|
#define MAGENTA(x) "\x1B[0;35m" x "\x1B[0m"
|
||||||
#define CYAN_BOLD(x) "\e[1;36m" x "\e[0m"
|
#define CYAN_BOLD(x) "\x1B[1;36m" x "\x1B[0m"
|
||||||
#define CYAN(x) "\e[0;36m" x "\e[0m"
|
#define CYAN(x) "\x1B[0;36m" x "\x1B[0m"
|
||||||
#define WHITE_BOLD(x) "\e[1;37m" x "\e[0m"
|
#define WHITE_BOLD(x) "\x1B[1;37m" x "\x1B[0m"
|
||||||
#define WHITE(x) "\e[0;37m" x "\e[0m"
|
#define WHITE(x) "\x1B[0;37m" x "\x1B[0m"
|
||||||
|
|
||||||
|
|
||||||
#define LOG_ERR(x, ...) Log::i()->message(Log::ERR, x, ##__VA_ARGS__)
|
#define LOG_ERR(x, ...) Log::i()->message(Log::ERR, x, ##__VA_ARGS__)
|
||||||
|
|
|
@ -301,9 +301,9 @@ void Workers::start(IWorker *worker)
|
||||||
const size_t memory = m_status.ways * xmrig::cn_select_memory(m_status.algo) / 1048576;
|
const size_t memory = m_status.ways * xmrig::cn_select_memory(m_status.algo) / 1048576;
|
||||||
|
|
||||||
if (m_status.colors) {
|
if (m_status.colors) {
|
||||||
LOG_INFO(GREEN_BOLD("READY (CPU)") " threads " CYAN_BOLD("%zu(%zu)") " huge pages %s%zu/%zu %1.0f%%\e[0m memory " CYAN_BOLD("%zu.0 MB") "",
|
LOG_INFO(GREEN_BOLD("READY (CPU)") " threads " CYAN_BOLD("%zu(%zu)") " huge pages %s%zu/%zu %1.0f%%\x1B[0m memory " CYAN_BOLD("%zu.0 MB") "",
|
||||||
m_status.threads, m_status.ways,
|
m_status.threads, m_status.ways,
|
||||||
(m_status.hugePages == m_status.pages ? "\e[1;32m" : (m_status.hugePages == 0 ? "\e[1;31m" : "\e[1;33m")),
|
(m_status.hugePages == m_status.pages ? "\x1B[1;32m" : (m_status.hugePages == 0 ? "\x1B[1;31m" : "\x1B[1;33m")),
|
||||||
m_status.hugePages, m_status.pages, percent, memory);
|
m_status.hugePages, m_status.pages, percent, memory);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue