Fix regression, option --no-color not fully disabled colored output.

This commit is contained in:
XMRig 2017-06-19 10:58:28 +03:00
parent ed0972da85
commit 9bfa49b7d0
5 changed files with 23 additions and 24 deletions

View file

@ -48,10 +48,11 @@ App::App(int argc, char **argv) :
{
m_self = this;
Console::init();
m_options = Options::parse(argc, argv);
Console::init(m_options->colors(), m_options->background());
Cpu::init();
m_options = Options::parse(argc, argv);
m_network = new Network(m_options);
uv_signal_init(uv_default_loop(), &m_signal);
@ -69,17 +70,17 @@ int App::exec()
return 0;
}
if (!CryptoNight::init(m_options->algo(), m_options->algoVariant())) {
LOG_ERR("\"%s\" hash self-test failed.", m_options->algoName());
return 1;
}
uv_signal_start(&m_signal, App::onSignal, SIGHUP);
uv_signal_start(&m_signal, App::onSignal, SIGTERM);
uv_signal_start(&m_signal, App::onSignal, SIGINT);
background();
if (!CryptoNight::init(m_options->algo(), m_options->algoVariant())) {
LOG_ERR("\"%s\" hash self-test failed.", m_options->algoName());
return 1;
}
Mem::allocate(m_options->algo(), m_options->threads(), m_options->doubleHash());
Summary::print();