Parser tests, part 4

This commit is contained in:
Matt Nadareski
2020-12-20 22:01:05 -08:00
parent 0cf44980a9
commit 7c85d8d661
7 changed files with 101 additions and 19 deletions

View File

@@ -537,6 +537,7 @@ namespace SabreTools.DatFiles.Formats
FlipX = reader.GetAttribute("flipx").AsYesNo(),
Width = Utilities.CleanLong(reader.GetAttribute("width")),
Height = Utilities.CleanLong(reader.GetAttribute("height")),
Refresh = Utilities.CleanDouble(reader.GetAttribute("refresh")),
PixClock = Utilities.CleanLong(reader.GetAttribute("pixclock")),
HTotal = Utilities.CleanLong(reader.GetAttribute("htotal")),
HBEnd = Utilities.CleanLong(reader.GetAttribute("hbend")),
@@ -552,13 +553,6 @@ namespace SabreTools.DatFiles.Formats
},
};
// Set the refresh
if (reader.GetAttribute("refresh") != null)
{
if (Double.TryParse(reader.GetAttribute("refresh"), out double refresh))
display.Refresh = refresh;
}
datItems.Add(display);
reader.Read();