diff options
Diffstat (limited to 'xmrstak')
-rw-r--r-- | xmrstak/backend/amd/amd_gpu/gpu.cpp | 4 | ||||
-rw-r--r-- | xmrstak/backend/amd/amd_gpu/gpu.hpp | 1 | ||||
-rw-r--r-- | xmrstak/jconf.cpp | 1 | ||||
-rw-r--r-- | xmrstak/misc/executor.cpp | 10 |
4 files changed, 11 insertions, 5 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp index 15b8457..879a2e4 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.cpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp @@ -476,7 +476,7 @@ std::vector<GpuContext> getAMDDevices(int index) if(clStatus == CL_SUCCESS) { std::string devVendor(devVendorVec.data()); - if( devVendor.find("Advanced Micro Devices") != std::string::npos) + if( devVendor.find("Advanced Micro Devices") != std::string::npos || devVendor.find("AMD") != std::string::npos) { GpuContext ctx; ctx.deviceIdx = k; @@ -541,7 +541,7 @@ int getAMDPlatformIdx() clGetPlatformInfo(platforms[i], CL_PLATFORM_VENDOR, infoSize, platformNameVec.data(), NULL); std::string platformName(platformNameVec.data()); - if( platformName.find("Advanced Micro Devices") != std::string::npos) + if( platformName.find("Advanced Micro Devices") != std::string::npos || platformName.find("Apple") != std::string::npos) { platformIndex = i; printer::inst()->print_msg(L0,"Found AMD platform index id = %i, name = %s",i , platformName.c_str()); diff --git a/xmrstak/backend/amd/amd_gpu/gpu.hpp b/xmrstak/backend/amd/amd_gpu/gpu.hpp index 123de01..abbd08d 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.hpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.hpp @@ -9,6 +9,7 @@ #endif #include <stdint.h> +#include <string> #include <vector> #define ERR_SUCCESS (0) diff --git a/xmrstak/jconf.cpp b/xmrstak/jconf.cpp index 462f564..34bde6c 100644 --- a/xmrstak/jconf.cpp +++ b/xmrstak/jconf.cpp @@ -158,6 +158,7 @@ bool jconf::GetPoolConfig(size_t id, pool_cfg& cfg) } else /* Special case - user selected same weights for everything */ cfg.weight = 0.0; + return true; } bool jconf::TlsSecureAlgos() diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp index cccfca7..ca78c61 100644 --- a/xmrstak/misc/executor.cpp +++ b/xmrstak/misc/executor.cpp @@ -459,6 +459,7 @@ void executor::on_miner_result(size_t pool_id, job_result& oResult) void disable_sigpipe() { struct sigaction sa; + memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; sa.sa_flags = 0; if (sigaction(SIGPIPE, &sa, 0) == -1) @@ -624,7 +625,10 @@ inline const char* hps_format(double h, char* buf, size_t l) { if(std::isnormal(h) || h == 0.0) { - snprintf(buf, l, " %03.1f", h); + if(h < 10.0) + snprintf(buf, l, " %03.1f", h); + else + snprintf(buf, l, " %04.1f", h); return buf; } else @@ -722,9 +726,9 @@ void executor::hashrate_report(std::string& out) std::transform(name.begin(), name.end(), name.begin(), ::toupper); out.append("HASHRATE REPORT - ").append(name).append("\n"); - out.append("| ID | 10s | 60s | 15m |"); + out.append("| ID | 10s | 60s | 15m |"); if(nthd != 1) - out.append(" ID | 10s | 60s | 15m |\n"); + out.append(" ID | 10s | 60s | 15m |\n"); else out.append(1, '\n'); |