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

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

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

--- trunk/EmuXPortal/Api/RomConfig.cs	2012/04/04 03:38:07	27
+++ trunk/EmuXPortal/Api/RomConfig.cs	2012/04/04 04:13:17	29
@@ -18,16 +18,16 @@
     public static class RomLoader
     {
         private const string EMU_CONFIG = "emu.config"; // if this file signifies the emulator configuration
-        public static IRomConfig Load(string rom_file)
+        public static IRomConfig Load(string rom_file, IEmuConfig EMUConfig)
         {
             IRomConfig config = null;
-            config = new RomConfig(rom_file);
+            config = new RomConfig(rom_file, EMUConfig);            
             return config;
         }
         #region private class RomConfig : IRomConfig
         private class RomConfig : IRomConfig
         {
-            public RomConfig(string rom_file)
+            public RomConfig(string rom_file, IEmuConfig EMUConfig)
             {
                 FileInfo fi = new FileInfo(rom_file);
                 this.RomFile =fi.FullName;
@@ -36,8 +36,9 @@
                 // load image
                 if (File.Exists(string.Format("{0}.jpg", fi.FullName.Replace(fi.Extension, "")))) { rom_img = string.Format("{0}.jpg", fi.FullName.Replace(fi.Extension, "")); }
                 this.RomImage = (rom_img == "") ? Properties.Resources.DefaultGameImage : Image.FromFile(rom_img);
-                string config_dir = fi.Directory.Parent.FullName;
-                Config = EmuConfigLoader.Load(config_dir);
+                //string config_dir = fi.Directory.Parent.FullName;
+                //Config = EmuConfigLoader.Load(config_dir);
+                Config = EMUConfig;
             }
             #region IRomConfig Members
             public string RomFile { get; private set; }

 

  ViewVC Help
Powered by ViewVC 1.1.22