[gnome-chess/gnome-3-36] 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-36] Disconnect engine timeout check when game ends
- Date: Sun, 6 Dec 2020 16:27:03 +0000 (UTC)
commit 83d9261237c65548533f52f389de24bc22c5bd25
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 ab37cdf..8dce6d0 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -1103,6 +1103,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)
{
@@ -1431,6 +1434,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]