X-Git-Url: http://winboard.nl/cgi-bin?p=uci2wb.git;a=blobdiff_plain;f=UCI2WB.c;h=ac6f7885355bf176a4c36cb8c1c4b433ba57a465;hp=c69971f8492aade43007ef1439f1b1dfaf9409ab;hb=007b58c758fdb300cbe21a202f85ebe733f6a786;hpb=8a892f02b87c910603094e2830ed0693dc192569 diff --git a/UCI2WB.c b/UCI2WB.c index c69971f..ac6f788 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -308,6 +308,9 @@ Engine2GUI() if(p = strstr(line+6, " default ")) sscanf(p+1, "default %[^\n]*", val), *p = '\n'; if(!(p = strstr(line+6, " name "))) p = line+1; sscanf(p+6, "%[^\n]", name); // 'name' is omitted in UCCI if(!strcasecmp(name, "UCI_Chess960")) { frc=2; continue; } + if(frc< 0 && (strstr(name, "960") || strcasestr(name, "frc")) && !strcmp(type, "check")) { + fprintf(toE, "setoption name %s value true\n", name); strcpy(val, "true"); // set non-standard suspected FRC options + } if(!strcasecmp(name, "Threads")) { strcpy(threadOpt, name); continue; } if(!strcasecmp(name, "Ponder") || !strcasecmp(name, "USI_Ponder")) { strcpy(canPonder, name); continue; } if(!strcasecmp(name, "Hash") || !strcasecmp(name, "USI_Hash") || !strcasecmp(name, "hashsize")) { @@ -400,7 +403,7 @@ GUI2Engine() if(!strcmp(command, "new")) { computer = BLACK; moveNr = 0; depth = -1; move[0][0] = 0; stm = WHITE; strcpy(iniPos, "position startpos"); frc &= ~1; - if(memory != oldMem && hasHash) fprintf(toE, "setoption name %s %s%d\n", hashOpt, valueWord, memory); + if(memory != oldMem && hasHash) fprintf(toE, "setoption %s%s %s%d\n", nameWord, hashOpt, valueWord, memory); oldMem = memory; // we can set other options here if(sc == 'x') { if(newGame) fprintf(toE, "setoption newgame\n"); } else // optional in UCCI