X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=75b1529c680e9c6e2fc1de0e8359b9cb3de666db;hb=c2d26163b3a12e756388c1a5a14df6bab46a79d0;hp=d1f3b04b605528051fb06c69e3f63b2ada2fee73;hpb=80e6f9d953e34c2f2ebf745a2e23e0eb6acf882b;p=xboard.git diff --git a/backend.c b/backend.c index d1f3b04..75b1529 100644 --- a/backend.c +++ b/backend.c @@ -6886,7 +6886,8 @@ LeftClick (ClickType clickType, int xPix, int yPix) || x == BOARD_RGHT+1 && y >= gameInfo.holdingsSize) ) return; - if(gotPremove && clickType == Press) { // user starts something after premove has been entered: abort premove as side effect + if(gotPremove && x == premoveFromX && y == premoveFromY && clickType == Release) { + // could be static click on premove from-square: abort premove gotPremove = 0; ClearPremoveHighlights(); } @@ -8362,7 +8363,7 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. /* * If chess program startup fails, exit with an error message. - * Attempts to recover here are futile. + * Attempts to recover here are futile. [HGM] Well, we try anyway */ if ((StrStr(message, "unknown host") != NULL) || (StrStr(message, "No remote directory") != NULL) @@ -8376,7 +8377,14 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. _(cps->which), cps->program, cps->host, message); RemoveInputSource(cps->isr); if(appData.icsActive) DisplayFatalError(buf1, 0, 1); else { - if(cps == &first) appData.noChessProgram = TRUE; + if(cps == &first) { + appData.noChessProgram = TRUE; + gameMode = MachinePlaysBlack; ModeHighlight(); // kludge to unmark Machine Black menu + gameMode = BeginningOfGame; ModeHighlight(); + SetNCPMode(); + } + if(GetDelayedEvent()) CancelDelayedEvent(), ThawUI(); // [HGM] cancel remaining loading effort scheduled after feature timeout + DisplayMessage("", ""); // erase waiting message DisplayError(buf1, 0); } return;