[gnome-chess/gnome-3-8] Always specify engine in saved game
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess/gnome-3-8] Always specify engine in saved game
- Date: Sun, 12 May 2013 18:14:40 +0000 (UTC)
commit b351265df266829f315912662d7ae9cd15965ce8
Author: Michael Catanzaro <mike catanzaro gmail com>
Date: Sun May 12 12:39:36 2013 -0500
Always specify engine in saved game
Even if the engine has never been changed from the default, specify it
(cherry picked from commit ebca48c0cd366da27ef89bb0b104196ea469775e)
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 0feef4a..ccefbba 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -1708,6 +1708,9 @@ public class Application : Gtk.Application
if (duration > 0)
pgn_game.time_control = "%d".printf (duration);
var engine_name = settings.get_string ("opponent");
+ /* explicitly specify engine name in saved game */
+ if (engine_name == "")
+ engine_name = ai_profiles.data.name;
var engine_level = settings.get_string ("difficulty");
if (engine_name != null && engine_name != "human")
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]