[gnome-chess] Stop the engine immediately after game ends
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] Stop the engine immediately after game ends
- Date: Mon, 13 May 2013 02:32:50 +0000 (UTC)
commit 370b7e03b7f9e9bd3639715fd446b41bc155842e
Author: Michael Catanzaro <mike catanzaro gmail com>
Date: Sun May 12 13:34:52 2013 -0500
Stop the engine immediately after game ends
It doesn't need to stay running until the next game begins, or
gnome-chess is closed. Particularly relevant when the engine doesn't
know that the game is over (e.g. after running out of time).
src/gnome-chess.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 434ce6d..8dbd1bf 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -857,6 +857,9 @@ public class Application : Gtk.Application
private void game_end_cb (ChessGame game)
{
+ if (opponent_engine != null)
+ opponent_engine.stop ();
+
string title = "";
switch (game.result)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]