/[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/06/19 03:38:40	85
+++ trunk/EmuXPortal/Api/EmuConfig.cs	2012/08/22 02:36:47	105
@@ -9,7 +9,7 @@
 
 namespace EmuXPortal.Api
 {
-    public interface IEmuConfig : IComparable
+    public interface IEmuConfig : IComparable<IEmuConfig>, IDisposable
     {
         string ConfigPath { get; }
         string PlatformNameShort { get; }
@@ -78,7 +78,7 @@
         #endregion
 
         #region private class EmuConfig : IEmuConfig
-        private class EmuConfig : IEmuConfig, IComparable
+        private class EmuConfig : IEmuConfig, IComparable<IEmuConfig>, IDisposable
         {
             public IEmuConfig Create(string rom_path) { return this.Create(string.Empty, rom_path); }
             public IEmuConfig Create(string config_path, string rom_path)
@@ -329,9 +329,9 @@
             }
             #region IComparable Members
 
-            public int CompareTo(object obj)
+            public int CompareTo(IEmuConfig obj)
             {
-                return this.PlatformNameLong.CompareTo((obj as EmuConfig).PlatformNameLong);
+                return this.PlatformNameLong.CompareTo(obj.PlatformNameLong);
             }
             public void RefreshConfig()
             {
@@ -339,6 +339,12 @@
                 this.Create(EmuRomPath);
             }
             #endregion
+
+            public void Dispose()
+            {
+                if (this.PlatformImage != null)
+                    this.PlatformImage.Dispose();
+            }
         }
         #endregion
 

 

  ViewVC Help
Powered by ViewVC 1.1.22