X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=engineoutput.c;fp=engineoutput.c;h=1ca977b51f7f8ec5a8541f549331955330755be9;hb=682bb14684d3d8be078029778e08ec2b48bae65e;hp=75e1f8dc16f40c47139f6c723791fb09b00a76cf;hpb=ece64eff3baf6a88bfb53eea936efb55d71ce96d;p=xboard.git diff --git a/engineoutput.c b/engineoutput.c index 75e1f8d..1ca977b 100644 --- a/engineoutput.c +++ b/engineoutput.c @@ -434,6 +434,7 @@ InsertionPoint (int len, EngineOutputData *ed) return offs + strlen(header[ed->which]); } +#define MATE_SCORE 100000 static char spaces[] = " "; // [HGM] align: spaces for padding static void @@ -590,6 +591,8 @@ UpdateControls (EngineOutputData *ed) if( h == 0 ) { snprintf( s_score, sizeof(s_score)/sizeof(s_score[0]), " 0.00%c\t", fail ); } else + if( h >= MATE_SCORE) snprintf(s_score, 16, " %s#%d%c\t", ( h > MATE_SCORE+9 ? "" : " "), h - MATE_SCORE, fail ); else + if(-h >= MATE_SCORE) snprintf(s_score, 16, " %s#-%d%c\t", (-h > MATE_SCORE+9 ? "" : " "), -h - MATE_SCORE, fail ); else if( h > 0 ) { snprintf( s_score, sizeof(s_score)/sizeof(s_score[0]), "+%.2f%c\t", h / 100.0, fail ); }