Browse Source

Merge branch 'tui_no_devapi_statline' into bfgminer

Luke Dashjr 12 years ago
parent
commit
6134863502
1 changed files with 14 additions and 4 deletions
  1. 14 4
      miner.c

+ 14 - 4
miner.c

@@ -2524,10 +2524,20 @@ void get_statline3(char *buf, struct cgpu_info *cgpu, bool for_curses, bool opt_
 	if (likely(cgpu->status != LIFE_DEAD2) && drv->override_statline_temp && drv->override_statline_temp(buf, cgpu, opt_show_procs))
 		strcat(buf, " | ");
 	else
-	if (cgpu->temp > 0.)
-		tailsprintf(buf, "%4.1fC | ", cgpu->temp);
-	else
-		strcat(buf, "      | ");
+	{
+		float temp = cgpu->temp;
+		if (!opt_show_procs)
+		{
+			// Find the highest temperature of all processors
+			for (struct cgpu_info *proc = cgpu; proc; proc = proc->next_proc)
+				if (proc->temp > temp)
+					temp = proc->temp;
+		}
+		if (temp > 0.)
+			tailsprintf(buf, "%4.1fC | ", cgpu->temp);
+		else
+			strcat(buf, "      | ");
+	}
 	
 #ifdef HAVE_CURSES
 	if (for_curses)