From 7f8c3e5bd0c3d70daf5b1f4c0b623d38f3301ff6 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 28 Oct 2014 00:12:50 +0100 Subject: [PATCH] Implement the UCCI usemillisec option This option is set (and msec are used) when the engine announced it with default value 'false'. --- UCI2WB.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/UCI2WB.c b/UCI2WB.c index 15b35de..8b8b460 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -303,6 +303,7 @@ Engine2GUI() continue; } if(!strcmp(name, "newgame") && !strcmp(type, "button")) { newGame++; continue; } + if(!strcmp(name, "usemillisec")) { unit = (!strcmp(val, "false") ? 2 : 1); continue; } // pass on engine-defined option as WB option feature if(!strcmp(type, "filename")) type[4] = 0; sprintf(buf, "feature option=\"%s -%s", name, type); q = buf + strlen(buf); @@ -330,6 +331,7 @@ Engine2GUI() else if(!strcmp(command, "readyok")) { pause = 0; Sync(WAKEUP); } // resume processing of GUI commands else if(sc == 'x'&& !strcmp(command, "ucciok") || sscanf(command, "u%ciok", &c)==1 && c==sc) { printf("feature smp=1 memory=%d done=1\n", hasHash); + if(unit == 2) unit = 1, fprintf(toE, "setoption usemillisec true\n"); Sync(WAKEUP); // done with options } } -- 1.7.0.4