From a5b96d3b2d6ae8d63ff14bb0e4e01b0b4ac32b63 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 8 Jun 2011 17:16:54 +0200 Subject: [PATCH] Clear Engine-Output pane when initializing engine This to prevent output from the previous game hanging there during the next game, when the engine that is really playing is in book and doesn't produce thinking output there. --- backend.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index 05e60b5..7309370 100644 --- a/backend.c +++ b/backend.c @@ -7135,6 +7135,15 @@ void SendProgramStatsToFrontend( ChessProgramState * cps, ChessProgramStats * cp SetProgramStats( &stats ); } +void +ClearEngineOutputPane(int which) +{ + static FrontEndProgramStats dummyStats; + dummyStats.which = which; + dummyStats.pv = "#"; + SetProgramStats( &dummyStats ); +} + #define MAXPLAYERS 500 char * @@ -9489,6 +9498,7 @@ InitChessProgram(cps, setup) SendToProgram(buf, cps); } cps->initDone = TRUE; + ClearEngineOutputPane(cps == &second); } -- 1.7.0.4