From fc59a21875f42703ed57bc69f44a48bcee2f89ec Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 28 Mar 2016 21:37:52 +0200 Subject: [PATCH] Suppress participation of second engine in EPD mode Starting the second engine, and initializng it for the next game in TwoMachineEvent() is now suppressed in EPD mode, so that the latter even works with a non-existent second engine. --- backend.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index b832d16..d879de7 100644 --- a/backend.c +++ b/backend.c @@ -15024,6 +15024,7 @@ TwoMachinesEvent P((void)) ScheduleDelayedEvent(TwoMachinesEventIfReady, 10); return; } + if(!appData.epd) { if(WaitForEngine(&second, TwoMachinesEventIfReady)) return; // (if needed:) started up second engine, so wait for features if(!SupportedVariant(second.variants, gameInfo.variant, gameInfo.boardWidth, @@ -15042,6 +15043,7 @@ TwoMachinesEvent P((void)) ScheduleDelayedEvent(TwoMachinesEventIfReady, 10); return; } + } GetTimeMark(&now); // [HGM] matchpause: implement match pause after engine load if(appData.matchPause>10000 || appData.matchPause<10) appData.matchPause = 10000; /* [HGM] make pause adjustable */ @@ -15053,6 +15055,7 @@ TwoMachinesEvent P((void)) // we are now committed to starting the game stalling = 0; DisplayMessage("", ""); + if(!appData.epd) { if (startedFromSetupPosition) { SendBoard(&second, backwardMostMove); if (appData.debugMode) { @@ -15062,6 +15065,7 @@ TwoMachinesEvent P((void)) for (i = backwardMostMove; i < forwardMostMove; i++) { SendMoveToProgram(i, &second); } + } gameMode = TwoMachinesPlay; pausing = startingEngine = FALSE; @@ -15080,11 +15084,13 @@ TwoMachinesEvent P((void)) snprintf(buf, MSG_SIZ, "name %s\n", second.tidy); SendToProgram(buf, &first); } + if(!appData.epd) { SendToProgram(second.computerString, &second); if (second.sendName) { snprintf(buf, MSG_SIZ, "name %s\n", first.tidy); SendToProgram(buf, &second); } + } ResetClocks(); if (!first.sendTime || !second.sendTime) { -- 1.7.0.4