Browse Source

GPU fan rpm display 9999 when it overflows

Kano 12 years ago
parent
commit
2d8cc36b82
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver-opencl.c

+ 2 - 1
driver-opencl.c

@@ -1284,7 +1284,8 @@ static void get_opencl_statline_before(char *buf, struct cgpu_info *gpu)
 		else
 		else
 			tailsprintf(buf, "       ", gt);
 			tailsprintf(buf, "       ", gt);
 		if (gf != -1)
 		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)
 		else if ((gp = gpu_fanpercent(gpuid)) != -1)
 			tailsprintf(buf, "%3d%%    ", gp);
 			tailsprintf(buf, "%3d%%    ", gp);
 		else
 		else