worked on premove bug
[xboard.git] / xengineoutput.c
index 77d5bf3..6c640ea 100644 (file)
@@ -188,9 +188,9 @@ typedef struct {
     int an_move_count;
 } EngineOutputData;
 
-static int VerifyDisplayMode();
+static void VerifyDisplayMode();
 static void UpdateControls( EngineOutputData * ed );
-static SetEngineState( int which, int state, char * state_data );
+static void SetEngineState( int which, int state, char * state_data );
 
 void ReadIcon(char *pixData[], int iconNr)
 {
@@ -570,7 +570,7 @@ void EngineOutputPopDown()
 
 
 // back end, due to front-end wrapper for SetWindowText, and new SetIcon arguments
-static SetEngineState( int which, int state, char * state_data )
+static void SetEngineState( int which, int state, char * state_data )
 {
     int x_which = 1 - which;
 
@@ -661,7 +661,7 @@ void EngineOutputUpdate( FrontEndProgramStats * stats )
     if( clearMemo ) DoClearMemo(which);
 
     /* Update */
-    lastDepth[which] = depth;
+    lastDepth[which] = depth == 1 && ed.nodes == 0 ? 0 : depth; // [HGM] info-line kudge
     lastForwardMostMove[which] = forwardMostMove;
 
     if( ed.pv != 0 && ed.pv[0] == ' ' ) {
@@ -756,7 +756,7 @@ static void SetDisplayMode( int mode )
 }
 
 // pure back end
-int VerifyDisplayMode()
+void VerifyDisplayMode()
 {
     int mode;
 
@@ -917,6 +917,7 @@ static void UpdateControls( EngineOutputData * ed )
         sprintf( s_time, "%d:%02d.%02d", time_secs / 60, time_secs % 60, time_cent );
 
         /* Put all together... */
+       if(ed->nodes == 0 && ed->score == 0 && ed->time == 0) sprintf( buf, "%3d\t", ed->depth ); else 
         sprintf( buf, "%3d  %s  %s\t%s\t", ed->depth, s_score, s_nodes, s_time );
 
         /* Add PV */