version 1.4.35b
[polyglot.git] / xboard2uci.c
index 97c7b73..529f041 100644 (file)
@@ -1462,10 +1462,17 @@ static void send_board(int extra_move) {
 // send_info()\r
 \r
 static void send_info() {\r
-    if (XB->post) {\r
-        gui_send(GUI,"%d %+d %.0f "S64_FORMAT" %s",Uci->best_depth>0?Uci->best_depth:1,\r
+    int min_depth;\r
+    if(option_get_bool(Option,"WbWorkArounds")){\r
+            // Silly bug in some versions of WinBoard.\r
+            // depth <=1 clears the engine output window.\r
+            // Why shouldn't an engine be allowed to send info at depth 1?\r
+        min_depth=2;\r
+    }else{\r
+        min_depth=1;\r
+    }\r
+    gui_send(GUI,"%d %+d %.0f "S64_FORMAT" %s",Uci->best_depth>min_depth?Uci->best_depth:min_depth,\r
                  0,0,0.0,0,Uci->info);  \r
-    }  \r
 }\r
 \r
 // send_pv()\r