/[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 10:37:13	198
+++ trunk/EmuXPortal/Api/EmuConfig.cs	2014/08/04 11:35:06	199
@@ -6,6 +6,7 @@
 using System.IO;
 using EmuXPortal.Logging;
 using System.Xml;
+using System.Diagnostics;
 
 namespace EmuXPortal.Api
 {
@@ -78,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)
@@ -275,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);
@@ -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