/[EmuXPortal]/trunk/EmuXPortal/Api/EmuConfig.cs
ViewVC logotype

Diff of /trunk/EmuXPortal/Api/EmuConfig.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/EmuXPortal/Api/EmuConfig.cs	2012/08/23 04:13:19	112
+++ trunk/EmuXPortal/Api/EmuConfig.cs	2012/08/23 04:47:35	126
@@ -31,7 +31,7 @@
         string GameExeArgs { get; }
 
 
-        void RefreshConfig();
+        void RefreshConfig(logger log);
         void ReleasePlatformImageResource();
     }
 
@@ -46,9 +46,9 @@
         public static IEmuConfig Load(logger log,string config_path, string rom_path) { return new EmuConfig().Create(log, config_path, rom_path); }
         #endregion
         #region parse emu options
-        public static string GetEMUOptions(IRomConfig config)
+        public static string GetEMUOptions(logger log, IRomConfig config)
         {
-            EMUOptions EMUOptions = new EMUOptions(config);
+            EMUOptions EMUOptions = new EMUOptions(log, config);
             return EMUOptions.Options;
         }
         #endregion
@@ -60,10 +60,10 @@
             private const string ROM_PATH = "%ROM_PATH%";
             #endregion
             private Dictionary<string, string> options_dict = new Dictionary<string, string>();
-            public EMUOptions(IRomConfig config)
+            public EMUOptions(logger log, IRomConfig config)
             {
                 init_dict(config);
-                config.Config.RefreshConfig();
+                config.Config.RefreshConfig(log);
                 string options = config.Config.EmuOptions;
                 string real_options = options;
                 foreach (KeyValuePair<string, string> pair in options_dict) { if (options.ToLower().Contains(pair.Key.ToLower())) { real_options = real_options.ToLower().Replace(pair.Key.ToLower(), pair.Value); } }
@@ -343,7 +343,7 @@
             {
                 return this.PlatformNameLong.CompareTo(obj.PlatformNameLong);
             }
-            public void RefreshConfig()
+            public void RefreshConfig(logger log)
             {
                 log.WriteLine("Refreshing config for: {0} from {1}", this.ToString(), string.Format(@"{0}\{1}", EmuRomPath, EMU_CONFIG));
                 this.Create(log,EmuRomPath);

 

  ViewVC Help
Powered by ViewVC 1.1.22