if(sscanf(line, "id name %[^\n]", name) == 1) printf("feature myname=\"%s (U%cI2WB)\"\n", name, sc-32);\r
}\r
else if(!strcmp(command, "readyok")) { pause = 0; Sync(WAKEUP); } // resume processing of GUI commands\r
- else if(sscanf(command, "u%ciok", &c)==1 && c==sc) printf("feature smp=1 memory=%d done=1\n", hasHash); // done with options\r
+ else if(sscanf(command, "u%ciok", &c)==1 && c==sc) printf("feature smp=1 memory=%d done=1\n", hasHash), Sync(WAKEUP); // done with options\r
}\r
}\r
\r
if(!variants) variants = sc=='s' ? "shogi,5x5+5_shogi" : VARIANTS;\r
printf("feature variants=\"%s\" setboard=1 usermove=1 debug=1 ping=1 reuse=0 done=0\n", variants);\r
printf("feature option=\"UCI2WB debug output -check %d\"\n", debug);\r
- fprintf(toE, "u%ci\n", sc); // this prompts UCI engine for options\r
+ fprintf(toE, "u%ci\n", sc); fflush(toE); // this prompts UCI engine for options\r
+ Sync(PAUSE); // wait for uciok\r
}\r
else if(!strcmp(command, "setboard")) {\r
if(strstr(line+9, " b ")) stm = BLACK;\r