[gnome-chess] Respect engine args specified in engines.conf



commit e9f7c8f0fb9a001ee035628fa61549d1196b6197
Author: Michael Catanzaro <mike catanzaro gmail com>
Date:   Wed Jan 2 13:17:18 2013 -0600

    Respect engine args specified in engines.conf
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691031

 src/chess-engine.vala | 4 +++-
 src/gnome-chess.vala  | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/chess-engine.vala b/src/chess-engine.vala
index 0792f3b..c1f07a5 100644
--- a/src/chess-engine.vala
+++ b/src/chess-engine.vala
@@ -1,6 +1,8 @@
 public class ChessEngine : Object
 {
     public string binary;
+    public string args;
+
     private Pid pid;
     private int stdin_fd;
     private int stderr_fd;
@@ -30,7 +32,7 @@ public class ChessEngine : Object
     
     public bool start ()
     {
-        string[] argv = { binary, null };
+        string[] argv = { binary, args, null };
         int stdout_fd;
         try
         {
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 1e6f5ee..d2062ee 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -529,6 +529,7 @@ public class Application : Gtk.Application
             return null;
         }
         engine.binary = profile.binary;
+        engine.args = profile.args;
 
         return engine;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]