Show 50-move counter also when observing ICS games
[xboard.git] / engineoutput.c
index 78117a7..0a45777 100644 (file)
@@ -84,6 +84,8 @@ void MakeEngineOutputTitle()
        static char oldTitle[MSG_SIZ];
        char *title = "Engine Output";
        int count, rule = 2*appData.ruleMoves;
+
+       if(!EngineOutputIsUp()) return;
        // figure out value of 50-move counter
        count = currentMove;
        while( (signed char)boards[count][EP_STATUS] <= EP_NONE && count > backwardMostMove ) count--;
@@ -91,7 +93,7 @@ void MakeEngineOutputTitle()
        count = currentMove - count;
        snprintf(buf, MSG_SIZ, "%s (%d reversible plies)", title, count);
        if(!rule) rule = 100;
-       if(count >= rule - 40 && !appData.icsActive) title = buf;
+       if(count >= rule - 40 && (!appData.icsActive || gameMode == IcsObserving)) title = buf;
        if(!strcmp(oldTitle, title)) return;
        safeStrCpy(oldTitle, title, MSG_SIZ);
        SetEngineOutputTitle(title);