mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatTools, Output] Dat cleanup
This commit is contained in:
@@ -80,16 +80,10 @@ namespace SabreTools.Helper
|
|||||||
public static Dat Parse(string filename, int sysid, int srcid, Dat datdata, Logger logger, bool keep = false, bool clean = false, bool softlist = false)
|
public static Dat Parse(string filename, int sysid, int srcid, Dat datdata, Logger logger, bool keep = false, bool clean = false, bool softlist = false)
|
||||||
{
|
{
|
||||||
// If the output filename isn't set already, get the internal filename
|
// If the output filename isn't set already, get the internal filename
|
||||||
if (String.IsNullOrEmpty(datdata.FileName))
|
datdata.FileName = (String.IsNullOrEmpty(datdata.FileName) ? Path.GetFileNameWithoutExtension(filename) : datdata.FileName);
|
||||||
{
|
|
||||||
datdata.FileName = Path.GetFileNameWithoutExtension(filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the output type isn't set already, get the internal output type
|
// If the output type isn't set already, get the internal output type
|
||||||
if (datdata.OutputFormat == OutputFormat.None)
|
datdata.OutputFormat = (datdata.OutputFormat == OutputFormat.None ? GetOutputFormat(filename) : datdata.OutputFormat);
|
||||||
{
|
|
||||||
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)
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ namespace SabreTools.Helper
|
|||||||
header = "clrmamepro (\n" +
|
header = "clrmamepro (\n" +
|
||||||
"\tname \"" + datdata.Name + "\"\n" +
|
"\tname \"" + datdata.Name + "\"\n" +
|
||||||
"\tdescription \"" + datdata.Description + "\"\n" +
|
"\tdescription \"" + datdata.Description + "\"\n" +
|
||||||
"\trootdir \"" + datdata.RootDir + "\"\n" +
|
|
||||||
"\tcategory \"" + datdata.Category + "\"\n" +
|
"\tcategory \"" + datdata.Category + "\"\n" +
|
||||||
"\tversion \"" + datdata.Version + "\"\n" +
|
"\tversion \"" + datdata.Version + "\"\n" +
|
||||||
"\tdate \"" + datdata.Date + "\"\n" +
|
"\tdate \"" + datdata.Date + "\"\n" +
|
||||||
|
|||||||
Reference in New Issue
Block a user