Fix quirks in inplace outputs

This commit is contained in:
Matt Nadareski
2016-05-26 21:43:28 -07:00
parent c0fb12682c
commit 430536dfca
3 changed files with 10 additions and 3 deletions

View File

@@ -127,7 +127,7 @@ namespace SabreTools
{ {
datHeaders.Add(new DatData datHeaders.Add(new DatData
{ {
FileName = Path.GetFullPath(userData.FileName), FileName = userData.FileName,
Name = userData.Name, Name = userData.Name,
Description = userData.Description, Description = userData.Description,
Version = userData.Version, Version = userData.Version,
@@ -148,7 +148,7 @@ namespace SabreTools
userData.Category = ""; userData.Category = "";
userData.Author = ""; userData.Author = "";
userData.ForcePacking = ForcePacking.None; userData.ForcePacking = ForcePacking.None;
userData.OutputFormat = OutputFormat.Xml; userData.OutputFormat = OutputFormat.None;
userData.Type = ""; userData.Type = "";
} }
} }

View File

@@ -99,7 +99,8 @@ namespace SabreTools.Helper
/// </summary> /// </summary>
public enum OutputFormat public enum OutputFormat
{ {
Xml = 0, None = 0,
Xml,
ClrMamePro, ClrMamePro,
RomCenter, RomCenter,
DOSCenter, DOSCenter,

View File

@@ -100,6 +100,12 @@ namespace SabreTools.Helper
datdata.FileName = Path.GetFileNameWithoutExtension(filename); datdata.FileName = Path.GetFileNameWithoutExtension(filename);
} }
// If the output type isn't set already, get the internal output type
if (datdata.OutputFormat == OutputFormat.None)
{
datdata.OutputFormat = GetOutputFormat(filename);
}
// Make sure there's a dictionary to read to // Make sure there's a dictionary to read to
if (datdata.Roms == null) if (datdata.Roms == null)
{ {