[gnome-chess/gnome-3-8] Stop the engine immediately after game ends
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess/gnome-3-8] Stop the engine immediately after game ends
- Date: Mon, 13 May 2013 02:32:58 +0000 (UTC)
commit 16126ed3a569b2e5f7dd21755a5bc122dffe4074
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).
(cherry picked from commit 370b7e03b7f9e9bd3639715fd446b41bc155842e)
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 ccefbba..6cfb946 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -859,6 +859,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]