From 924abda0bf38d06237f3dc812ce9fa5836a029b7 Mon Sep 17 00:00:00 2001
From: fireice-uk <fireice-uk@users.noreply.github.com>
Date: Wed, 17 Oct 2018 15:40:16 +0100
Subject: [PATCH] Add console warning on GPU error.

Co-authored-by: Hans Kristian Rosbach <hk-git@circlestorm.org>
---
 xmrstak/misc/executor.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp
index 4fcce1f..a303b34 100644
--- a/xmrstak/misc/executor.cpp
+++ b/xmrstak/misc/executor.cpp
@@ -627,8 +627,12 @@ void executor::ex_main()
 			break;
 
 		case EV_GPU_RES_ERROR:
-			log_result_error(std::string(ev.oGpuError.error_str + std::string(" GPU ID ") + std::to_string(ev.oGpuError.idx)));
+		{
+			std::string err_msg = std::string(ev.oGpuError.error_str) + " GPU ID " + std::to_string(ev.oGpuError.idx);
+			printer::inst()->print_msg(L0, err_msg.c_str());
+			log_result_error(std::move(err_msg));
 			break;
+		}
 
 		case EV_PERF_TICK:
 			for (i = 0; i < pvThreads->size(); i++)
-- 
GitLab