From: H.G.Muller Date: Fri, 5 Sep 2014 11:41:34 +0000 (+0200) Subject: Fix size of time in Engine Output window X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=b9f8b38909242fb0c9c3a4398fcf0c1121d49fcc;hp=acd8b8e897a59954fdcaa8ab9d55af4b9c290778;p=xboard.git Fix size of time in Engine Output window When the thinking time exceeds an hour, the format hr:min:sec is now used, in stead of min:sec.cents. This prevents the field from extending beyond the tab stop when thr hours kick in, and should work upto 100 hrs. (Going beyond that at the moment does not seem useful.) --- diff --git a/engineoutput.c b/engineoutput.c index 2532ef8..11229b9 100644 --- a/engineoutput.c +++ b/engineoutput.c @@ -606,6 +606,9 @@ UpdateControls (EngineOutputData *ed) } /* Time */ + if(time_secs >= 3600) + snprintf( s_time, sizeof(s_time)/sizeof(s_time[0]), "%d:%02d:%02d\t", time_secs / 3600, (time_secs / 60) % 60, time_secs % 60 ); + else snprintf( s_time, sizeof(s_time)/sizeof(s_time[0]), "%d:%02d.%02d\t", time_secs / 60, time_secs % 60, time_cent ); if(columnMask & 2) s_score[0] = NULLCHAR; // [HGM] hide: erase columns the user has hidden