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

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

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

--- trunk/EmuXPortal/Api/RomFavorite.cs	2014/08/04 11:35:06	199
+++ trunk/EmuXPortal/Api/RomFavorite.cs	2014/08/04 12:39:13	200
@@ -73,7 +73,23 @@
         internal static List<IRomConfig> GetRoms(logger log)
         {
             List<IRomConfig> roms = new List<IRomConfig>();
-            lst_favorites.ForEach(s => roms.Add(s.RomConfig));
+            //lst_favorites.ForEach(s => roms.Add(s.RomConfig));
+
+            foreach (var rom in lst_favorites)
+            {
+                IRomConfig rom_config = rom.RomConfig;
+                try
+                {
+                    var format = rom_config.RomImage.RawFormat;
+                }
+                catch (ArgumentException)
+                {
+                    var emu_config = EmuConfigLoader.Load(log, rom.RomConfig.Config.ConfigPath, rom.RomConfig.Config.EmuRomPath);
+                    rom_config = RomLoader.Load(log, rom.RomConfig.RomFile, emu_config);
+                }                                            
+                roms.Add(rom_config);
+            }
+
             return roms;
         }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22