mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Output] Fix DAT output
This commit is contained in:
@@ -299,7 +299,7 @@ namespace SabreTools.Helper
|
|||||||
switch (datdata.OutputFormat)
|
switch (datdata.OutputFormat)
|
||||||
{
|
{
|
||||||
case OutputFormat.ClrMamePro:
|
case OutputFormat.ClrMamePro:
|
||||||
state += "game (\n\tname \"" + rom.Machine + "\"\n" +
|
state += "game (\n\tname \"" + rom.Machine.Name + "\"\n" +
|
||||||
"\tdescription \"" + (String.IsNullOrEmpty(rom.Machine.Description) ? rom.Machine.Name : rom.Machine.Description) + "\"\n";
|
"\tdescription \"" + (String.IsNullOrEmpty(rom.Machine.Description) ? rom.Machine.Name : rom.Machine.Description) + "\"\n";
|
||||||
break;
|
break;
|
||||||
case OutputFormat.SabreDat:
|
case OutputFormat.SabreDat:
|
||||||
@@ -315,7 +315,7 @@ namespace SabreTools.Helper
|
|||||||
depth = depth - (last == -1 ? 0 : last) + newsplit.Count;
|
depth = depth - (last == -1 ? 0 : last) + newsplit.Count;
|
||||||
break;
|
break;
|
||||||
case OutputFormat.Xml:
|
case OutputFormat.Xml:
|
||||||
state += "\t<machine name=\"" + HttpUtility.HtmlEncode(rom.Machine) + "\">\n" +
|
state += "\t<machine name=\"" + HttpUtility.HtmlEncode(rom.Machine.Name) + "\">\n" +
|
||||||
"\t\t<description>" + HttpUtility.HtmlEncode((String.IsNullOrEmpty(rom.Machine.Description) ? rom.Machine.Name : rom.Machine.Description)) + "</description>\n";
|
"\t\t<description>" + HttpUtility.HtmlEncode((String.IsNullOrEmpty(rom.Machine.Description) ? rom.Machine.Name : rom.Machine.Description)) + "</description>\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -477,6 +477,7 @@ namespace SabreTools
|
|||||||
_datdata.FileName = "fixDat_" + _datdata.FileName;
|
_datdata.FileName = "fixDat_" + _datdata.FileName;
|
||||||
_datdata.Name = "fixDat_" + _datdata.Name;
|
_datdata.Name = "fixDat_" + _datdata.Name;
|
||||||
_datdata.Description = "fixDat_" + _datdata.Description;
|
_datdata.Description = "fixDat_" + _datdata.Description;
|
||||||
|
_datdata.OutputFormat = OutputFormat.Xml;
|
||||||
Output.WriteDatfile(_datdata, "", _logger);
|
Output.WriteDatfile(_datdata, "", _logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user