/[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	2014/08/04 05:01:23	170
+++ trunk/EmuXPortal/Api/EmuConfig.cs	2014/08/04 11:35:06	199
@@ -6,11 +6,13 @@
 using System.IO;
 using EmuXPortal.Logging;
 using System.Xml;
+using System.Diagnostics;
 
 namespace EmuXPortal.Api
 {
     public interface IEmuConfig : IComparable<IEmuConfig>, IDisposable
     {
+        bool IsFavorites { get; }
         string ConfigPath { get; }
         string PlatformNameShort { get; }
         string PlatformNameLong { get; }
@@ -33,9 +35,7 @@
 
         void RefreshConfig(logger log);
         void ReleasePlatformImageResource();
-    }
-
-
+    }    
 
     public static class EmuConfigLoader
     {
@@ -79,7 +79,7 @@
         #endregion
 
         #region private class EmuConfig : IEmuConfig
-        private class EmuConfig : IEmuConfig, IComparable<IEmuConfig>, IDisposable
+        internal class EmuConfig : IEmuConfig, IComparable<IEmuConfig>, IDisposable
         {
             public IEmuConfig Create(logger log, string rom_path) { return this.Create(log, string.Empty, rom_path); }
             public IEmuConfig Create(logger log, string config_path, string rom_path)
@@ -276,6 +276,11 @@
             public EmuConfig(logger log, string PlatformNameShort, string PlatformNameLong, string PlatformImage, string Extenstions, string EmuPath) : this(log, PlatformNameShort, PlatformNameLong, PlatformImage, Extenstions, EmuPath, "") { }
             public EmuConfig(logger log, string PlatformNameShort, string PlatformNameLong, string PlatformImage, string Extenstions, string EmuPath, string EmuOptions)
             {
+                //if (string.IsNullOrEmpty(EmuRomPath))
+                //{
+                //    if (Debugger.IsAttached)
+                //        Debugger.Break();
+                //}
                 this.PlatformNameShort = PlatformNameShort;
                 this.PlatformNameLong = PlatformNameLong;
                 this.PlatformImage = (PlatformImage == "") ? Properties.Resources.DefaultPlatformImage : Image.FromFile(PlatformImage);
@@ -290,6 +295,7 @@
                 this.log = log;
             }
             #region IEmuConfig members
+            public bool IsFavorites { get { return false; } }
             public string ConfigPath { get; set; }
             private string _PlatformNameShort;
             public string PlatformNameShort
@@ -298,8 +304,13 @@
                 {
                     try
                     {
-                        DirectoryInfo t = new DirectoryInfo(EmuRomPath);
+                        //if (string.IsNullOrEmpty(EmuRomPath))
+                        //{
+                        //    return "EmuRomPath null";
+                        //}
+                        DirectoryInfo t = new DirectoryInfo(EmuRomPath);                      
                         return (_PlatformNameShort == "") ? string.Format("{0} (folder={1})", Unknown_Platform, t.Name) : _PlatformNameShort;
+                        
                     }
                     catch (Exception ex)
                     {

 

  ViewVC Help
Powered by ViewVC 1.1.22