X-Git-Url: http://winboard.nl/cgi-bin?p=polyglot.git;a=blobdiff_plain;f=xboard2uci.c;h=d026096b88882ba0c4262c7707636ea942cacc6a;hp=529f041ffec618a1c70958a0952c3b8e39a5a36d;hb=1087eb7b2d8447adf9a7deb549d4004a87b46b10;hpb=acb140befabd8b0f1a8606470013b420d05b4fb7 diff --git a/xboard2uci.c b/xboard2uci.c index 529f041..d026096 100644 --- a/xboard2uci.c +++ b/xboard2uci.c @@ -454,11 +454,17 @@ void xboard2uci_gui_step(char string[]) { char *pg_name=Star[0]; polyglot_set_option(pg_name,value); }else{ - start_protected_command(); - if(!uci_send_option(Uci, name, "%s", value)){ + option_t *opt=option_find(Uci->option,name); + if(opt){ + if(my_string_case_equal(opt->type,"check")){ + value=my_string_equal(value,"1")?"true":"false"; + } + start_protected_command(); + uci_send_option(Uci, name, "%s", value); + end_protected_command(); + }else{ gui_send(GUI,"Error (unknown option): %s",name); } - end_protected_command(); } } else if (match(string,"option *")){ char *name=Star[0]; @@ -740,6 +746,7 @@ void xboard2uci_engine_step(char string[]) { gui_send(GUI,"1-0 {polyglot: resign" " (illegal engine move black)}"); } + board_disp(board); XB->result = TRUE; mess(); } @@ -1463,7 +1470,7 @@ static void send_board(int extra_move) { static void send_info() { int min_depth; - if(option_get_bool(Option,"WbWorkArounds")){ + if(option_get_bool(Option,"WbWorkArounds2")){ // Silly bug in some versions of WinBoard. // depth <=1 clears the engine output window. // Why shouldn't an engine be allowed to send info at depth 1?