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

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

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

revision 199 by william, Mon Aug 4 11:35:06 2014 UTC revision 200 by william, Mon Aug 4 12:39:13 2014 UTC
# Line 79  namespace EmuXPortal.Api Line 79  namespace EmuXPortal.Api
79          {          {
80              string PlatformNameShort = child_config.PlatformNameShort.Contains("Unknown") ? parent_config.PlatformNameShort != "" ? parent_config.PlatformNameShort : "" : child_config.PlatformNameShort;              string PlatformNameShort = child_config.PlatformNameShort.Contains("Unknown") ? parent_config.PlatformNameShort != "" ? parent_config.PlatformNameShort : "" : child_config.PlatformNameShort;
81              string PlatformNameLong = child_config.PlatformNameLong.Contains("Unknown") ? parent_config.PlatformNameLong != "" ? parent_config.PlatformNameLong : "" : child_config.PlatformNameLong;              string PlatformNameLong = child_config.PlatformNameLong.Contains("Unknown") ? parent_config.PlatformNameLong != "" ? parent_config.PlatformNameLong : "" : child_config.PlatformNameLong;
82              string PlatformImage = child_config.GameImage == "" ? parent_config.GameImage != "" ? parent_config.GameImage : "" : child_config.GameImage;              string PlatformImage = "";
83              string Extenstions = child_config.Extenstions == "" ? parent_config.Extenstions != "" ? parent_config.Extenstions : "" : child_config.Extenstions;              string Extenstions = child_config.Extenstions == "" ? parent_config.Extenstions != "" ? parent_config.Extenstions : "" : child_config.Extenstions;
84              string EmuPath = child_config.EmuPath == "" ? parent_config.EmuPath != "" ? parent_config.EmuPath : "" : child_config.EmuPath;              string EmuPath = child_config.EmuPath == "" ? parent_config.EmuPath != "" ? parent_config.EmuPath : "" : child_config.EmuPath;
85              string EmuOptions = child_config.EmuOptions == "" ? parent_config.EmuOptions != "" ? parent_config.EmuOptions : "" : child_config.EmuOptions;              string EmuOptions = child_config.EmuOptions == "" ? parent_config.EmuOptions != "" ? parent_config.EmuOptions : "" : child_config.EmuOptions;
86    
             FileInfo fi = new FileInfo(PlatformImage);  
             if (!fi.Exists)  
             {  
                 PlatformImage = string.Format(@"{0}\{1}", new FileInfo(child_config.GameExe).Directory.FullName, PlatformImage);  
                 fi = new FileInfo(PlatformImage);  
                 if (!fi.Exists)  
                 {  
                     PlatformImage = string.Format(@"{0}\{1}", new FileInfo(parent_config.EmuRomPath).Directory.FullName, PlatformImage);  
                     fi = new FileInfo(PlatformImage);  
                     if (!fi.Exists) { PlatformImage = ""; }  
                 }  
             }  
             fi = null;  
87    
88                
89              EmuXPortal.Api.EmuConfigLoader.EmuConfig c = new EmuConfigLoader.EmuConfig(log,              EmuXPortal.Api.EmuConfigLoader.EmuConfig c = new EmuConfigLoader.EmuConfig(log,
90                  PlatformNameShort, PlatformNameLong, PlatformImage,                  PlatformNameShort, PlatformNameLong, PlatformImage,
91                  Extenstions, EmuPath, EmuOptions);                  Extenstions, EmuPath, EmuOptions);
# Line 109  namespace EmuXPortal.Api Line 97  namespace EmuXPortal.Api
97              c.GameImage = child_config.GameImage;              c.GameImage = child_config.GameImage;
98              c.GameTitle = child_config.GameTitle;              c.GameTitle = child_config.GameTitle;
99              c.ConfigPath = child_config.ConfigPath;              c.ConfigPath = child_config.ConfigPath;
100                c.GameImage = child_config.GameImage;
101              return c;              return c;
102          }          }
103          private List<IRomConfig> GenerateRomConfig(logger log, List<IRomConfigPair> roms, IEmuConfig config)          private List<IRomConfig> GenerateRomConfig(logger log, List<IRomConfigPair> roms, IEmuConfig config)

Legend:
Removed from v.199  
changed lines
  Added in v.200

  ViewVC Help
Powered by ViewVC 1.1.22