From 990ae69c6d5ff8468541372acc4c6fcb854f64e2 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 8 Dec 2018 13:50:18 +0100 Subject: [PATCH] Handle periodic updates with easy commands The poll for periodic updates should not cause the analysis search to abort, which queued commands would do. --- UCI2WB.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/UCI2WB.c b/UCI2WB.c index 8715276..41c71c8 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -458,6 +458,9 @@ GUI2Engine() else if(!strcmp(command, "offer")) drawOffer = 1; // backlogged anyway, so this can be done instantly else if(!strcmp(command, "post")) post = 1; else if(!strcmp(command, "nopost"))post = 0; + else if(!strcmp(command, ".")) { + printf("stat01: %d %d %d %d 100 %s\n", statTime, statNodes, statDepth, 100-currNr, currMove); + } else if(!strcmp(command, "pause")) { if(computer == stm) myTime -= GetTickCount() - startTime; suspended = 1 + (searching == 1); // remember if we were pondering, and stop search ignoring bestmove @@ -587,10 +590,6 @@ DoCommand () else if(!strcmp(command, "undo") && (i=1) || !strcmp(command, "remove") && (i=2)) { moveNr = moveNr > i ? moveNr - i : 0; collect = (computer == ANALYZE); sm = 0; } - else if(!strcmp(command, ".")) { - printf("stat01: %d %d %d %d 100 %s\n", statTime, statNodes, statDepth, 100-currNr, currMove); - return 1; - } else if(!strcmp(command+2, "clude") && collect > 2) { // include or exclude int all = !strcmp(line+8, "all"), in = command[1] == 'n'; inex = 1; line[strlen(line)-1] = sm = 0; // strip LF and clear sm flag -- 1.7.0.4