Commit a5437f182f84f34ae2c58b06e7b6901aa983ae2b

kanoi 2013-06-28T06:32:31

Merge pull request #458 from kanoi/master GPU fan rpm display 9999 when it overflows

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/driver-opencl.c b/driver-opencl.c
index 3c10c70..9bb7b1f 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -1284,7 +1284,8 @@ static void get_opencl_statline_before(char *buf, struct cgpu_info *gpu)
 		else
 			tailsprintf(buf, "       ", gt);
 		if (gf != -1)
-			tailsprintf(buf, "%4dRPM ", gf);
+			// show invalid as 9999
+			tailsprintf(buf, "%4dRPM ", gf > 9999 ? 9999 : gf);
 		else if ((gp = gpu_fanpercent(gpuid)) != -1)
 			tailsprintf(buf, "%3d%%    ", gp);
 		else