diff options
Diffstat (limited to 'backend/amd')
-rw-r--r-- | backend/amd/autoAdjust.hpp | 5 | ||||
-rw-r--r-- | backend/amd/jconf.h | 3 | ||||
-rw-r--r-- | backend/amd/minethd.cpp | 11 |
3 files changed, 8 insertions, 11 deletions
diff --git a/backend/amd/autoAdjust.hpp b/backend/amd/autoAdjust.hpp index e6e4015..442d8f1 100644 --- a/backend/amd/autoAdjust.hpp +++ b/backend/amd/autoAdjust.hpp @@ -8,6 +8,7 @@ #include "../../console.h" #include "../../ConfigEditor.hpp" #include "amd_gpu/gpu.h" +#include "../../Params.hpp" #include <vector> #include <cstdio> @@ -102,8 +103,8 @@ private: configTpl.replace("PLATFORMINDEX",std::to_string(platformIndex)); configTpl.replace("NUMGPUS",std::to_string(devVec.size())); configTpl.replace("GPUCONFIG",conf); - configTpl.write("amd.txt"); - printer::inst()->print_msg(L0, "AMD: GPU configuration stored in file '%s'", "amd.txt"); + configTpl.write(Params::inst().configFileAMD); + printer::inst()->print_msg(L0, "AMD: GPU configuration stored in file '%s'", Params::inst().configFileAMD.c_str()); } std::vector<GpuContext> devVec; diff --git a/backend/amd/jconf.h b/backend/amd/jconf.h index 463284a..9fef331 100644 --- a/backend/amd/jconf.h +++ b/backend/amd/jconf.h @@ -1,6 +1,7 @@ #pragma once #include <stdlib.h> #include <string> +#include "../../Params.hpp" namespace xmrstak { @@ -16,7 +17,7 @@ public: return oInst; }; - bool parse_config(const char* sFilename = "amd.txt"); + bool parse_config(const char* sFilename = Params::inst().configFileAMD.c_str()); struct thd_cfg { size_t index; diff --git a/backend/amd/minethd.cpp b/backend/amd/minethd.cpp index 0821c0e..b938f2d 100644 --- a/backend/amd/minethd.cpp +++ b/backend/amd/minethd.cpp @@ -40,6 +40,7 @@ #include "../../jconf.h" #include "../../crypto/cryptonight.h" #include "../../Environment.hpp" +#include "../../Params.hpp" #include "amd_gpu/gpu.h" @@ -97,19 +98,13 @@ std::vector<IBackend*>* minethd::thread_starter(uint32_t threadOffset, miner_wor { std::vector<IBackend*>* pvThreads = new std::vector<IBackend*>(); - if(!ConfigEditor::file_exist("amd.txt")) + if(!ConfigEditor::file_exist(Params::inst().configFileAMD)) { autoAdjust adjust; if(!adjust.printConfig()) return pvThreads; } -/* - if(!ConfigEditor::file_exist("amd.txt")) - { - printer::inst()->print_msg(L0, "WARNING: missing config file 'amd.txt'"); - return pvThreads; - } -*/ + if(!jconf::inst()->parse_config()) { win_exit(); |