From 2979b2c8729f1da808b901c7464a8c7ade61863f Mon Sep 17 00:00:00 2001 From: MoneroOcean Date: Sat, 4 Aug 2018 11:40:40 +0200 Subject: [PATCH] Only save config if threads were automatically calculated --- src/core/Config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Config.cpp b/src/core/Config.cpp index 7fc2e913..aab48cf7 100644 --- a/src/core/Config.cpp +++ b/src/core/Config.cpp @@ -198,19 +198,19 @@ bool xmrig::Config::finalize() if (!m_threads[pa].count) { m_threads[pa].count = Cpu::optimalThreadsCount(size, m_maxCpuUsage); + m_shouldSave = true; } else if (m_safe) { const size_t count = Cpu::optimalThreadsCount(size, m_maxCpuUsage); if (m_threads[pa].count > count) { m_threads[pa].count = count; + m_shouldSave = true; } } for (size_t i = 0; i < m_threads[pa].count; ++i) { m_threads[pa].list.push_back(CpuThread::createFromAV(i, xmrig::Algorithm(pa).algo(), av, m_threads[pa].mask, m_priority)); } - - m_shouldSave = true; } }