/[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/04/04 02:13:41	21
+++ trunk/EmuXPortal/Api/EmuConfig.cs	2012/04/04 02:39:20	22
@@ -44,12 +44,15 @@
                     {
                         using (XmlReader reader = XmlReader.Create(fs))
                         {
+                            string value = "";
                             reader.ReadToFollowing("PLATFORMNAMESHORT");
-                            config.PlatformNameShort = reader.ReadElementContentAsString();
+                            value = reader.ReadElementContentAsString();
+                            config.PlatformNameShort = (value == "") ? config.PlatformNameShort: value;
                             logger.WriteLine("\t\tPLATFORMNAMESHORT={0}", config.PlatformNameShort);
 
                             reader.ReadToFollowing("PLATFORMNAMELONG");
-                            config.PlatformNameLong = reader.ReadElementContentAsString();
+                            value = reader.ReadElementContentAsString();
+                            config.PlatformNameLong = (value == "") ? config.PlatformNameLong : value;
                             logger.WriteLine("\t\tPLATFORMNAMELONG={0}", config.PlatformNameLong);
 
                             reader.ReadToFollowing("PLATFORMIMAGE");
@@ -59,16 +62,19 @@
                             logger.WriteLine("\t\tPLATFORMIMAGE={0}", str_platform_image);
 
                             reader.ReadToFollowing("EXTENSIONS");
-                            config.Extenstions = reader.ReadElementContentAsString();
+                            value = reader.ReadElementContentAsString();
+                            config.Extenstions = (value == "") ? config.Extenstions : value;
                             logger.WriteLine("\t\tEXTENSIONS={0}", config.Extenstions);
 
                             reader.ReadToFollowing("EMULATORPATH");
-                            config.EmuPath = reader.ReadElementContentAsString();
+                            value = reader.ReadElementContentAsString();
+                            config.EmuPath = (value == "") ? config.EmuPath : value;
                             logger.WriteLine("\t\tEMULATORPATH={0}", config.EmuPath);
 
                             reader.ReadToFollowing("EMULATOROPTIONS");
-                            config.EmuOptions = reader.ReadElementContentAsString();
-                            logger.WriteLine("\t\tEMULATOROPTIONS={0}", config.EmuOptions);
+                            value = reader.ReadElementContentAsString();
+                            config.EmuOptions = (value == "") ? config.EmuOptions : value;
+                            logger.WriteLine("\tEMULATOROPTIONS={0}", config.EmuOptions);
                         }
                     }
                     logger.WriteLine("\tLoaded Config: {0}", config_path);

 

  ViewVC Help
Powered by ViewVC 1.1.22