mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
No roms means a reduced footer, if any
This commit is contained in:
@@ -476,6 +476,10 @@ namespace SabreTools.Helper
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
string footer = "";
|
string footer = "";
|
||||||
|
|
||||||
|
// If we have roms, output the full footer
|
||||||
|
if (datdata.Roms.Count > 0)
|
||||||
|
{
|
||||||
switch (datdata.OutputFormat)
|
switch (datdata.OutputFormat)
|
||||||
{
|
{
|
||||||
case OutputFormat.ClrMamePro:
|
case OutputFormat.ClrMamePro:
|
||||||
@@ -497,6 +501,19 @@ namespace SabreTools.Helper
|
|||||||
footer = "\t</machine>\n</datafile>";
|
footer = "\t</machine>\n</datafile>";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise, output the abbreviated form
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (datdata.OutputFormat)
|
||||||
|
{
|
||||||
|
case OutputFormat.SabreDat:
|
||||||
|
case OutputFormat.Xml:
|
||||||
|
footer = "</datafile>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Write the footer out
|
// Write the footer out
|
||||||
sw.Write(footer);
|
sw.Write(footer);
|
||||||
|
|||||||
Reference in New Issue
Block a user