[gnome-chess] Always specify engine in saved game



commit ebca48c0cd366da27ef89bb0b104196ea469775e
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

 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 5f259ca..434ce6d 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -1706,6 +1706,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]