From 2a8b7e681d41817581d4df748b07d42f5109c4c6 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 10 Apr 2012 22:55:07 +0200 Subject: [PATCH] Suppress popup for fatal error after tellusererror For cooperating better with Polyglot, and allowing more to-the-point error messaging, the (awful) default message will be suppressed if the dying engine already provided an explanation for its demise to the user. --- backend.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend.c b/backend.c index 58f8079..91f6e8d 100644 --- a/backend.c +++ b/backend.c @@ -7938,7 +7938,7 @@ HandleMachineMove (char *message, ChessProgramState *cps) ChessMove moveType; char promoChar; char *p, *pv=buf1; - int machineWhite; + int machineWhite, oldError; char *bookHit; if(cps == &pairing && sscanf(message, "%d-%d", &savedWhitePlayer, &savedBlackPlayer) == 2) { @@ -7952,7 +7952,7 @@ HandleMachineMove (char *message, ChessProgramState *cps) return; // Skim the pairing messages here. } - cps->userError = 0; + oldError = cps->userError; cps->userError = 0; FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book hit /* @@ -8532,7 +8532,7 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. } if(GetDelayedEvent()) CancelDelayedEvent(), ThawUI(); // [HGM] cancel remaining loading effort scheduled after feature timeout DisplayMessage("", ""); // erase waiting message - DisplayError(buf1, 0); + if(!oldError) DisplayError(buf1, 0); // if reason neatly announced, suppress general error popup } return; } -- 1.7.0.4