[gnome-chess/gnome-3-38] Disconnect engine timeout check when game ends
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess/gnome-3-38] Disconnect engine timeout check when game ends
- Date: Sun, 6 Dec 2020 16:26:50 +0000 (UTC)
commit ff32ba9d64a22a8ad65b0c4b8ee6720b705c191e
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Dec 6 10:25:53 2020 -0600
Disconnect engine timeout check when game ends
Oops, this is a regression from 5ca2ab04. We don't want to complain that
the engine has not moved if the game is over....
src/gnome-chess.vala | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index d4a1d33..6fa67f7 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -1100,6 +1100,9 @@ Copyright © 2015–2016 Sahil Sareen""";
engine_timeout_source = 0;
}
+ if (!game.is_started)
+ return;
+
if (pgn_game.white_ai != null && game.current_player.color == Color.WHITE ||
pgn_game.black_ai != null && game.current_player.color == Color.BLACK)
{
@@ -1428,6 +1431,8 @@ Copyright © 2015–2016 Sahil Sareen""";
headerbar.set_title (title);
headerbar.set_subtitle (reason);
+ update_engine_timeout ();
+
white_time_label.queue_draw ();
black_time_label.queue_draw ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]