Miscellaneous formatting cleanup

This commit is contained in:
Matt Nadareski
2026-03-10 13:37:09 -04:00
parent 8635b25978
commit 0cadd5bccd
6 changed files with 7 additions and 9 deletions

View File

@@ -66,6 +66,7 @@
- Repair incomplete SS files
- Cleanup of processing code
- Options helper cleanup
- Miscellaneous formatting cleanup
### 3.6.0 (2025-11-28)

View File

@@ -61,7 +61,7 @@ namespace MPF.Frontend.ComboBoxItems
#if NET20
// The resulting dictionary does not have ordered value lists
var mapping = new Dictionary<SystemCategory, List<RedumpSystem?>>();
Dictionary<SystemCategory, List<RedumpSystem?>> mapping = [];
foreach (var knownSystem in knownSystems)
{
var category = knownSystem.GetCategory();

View File

@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
#if NET35_OR_GREATER || NETCOREAPP
#if NET462_OR_GREATER || NETCOREAPP
using System.Linq;
#endif
using System.Text;

View File

@@ -378,7 +378,7 @@ namespace MPF.Processors
File.Copy(xgd1SSPath, xgd1RawSSPath);
}
catch { }
// Repair, clean, and validate SS before adding hash to submission info
if (ProcessingTool.FixSS(xgd1SSPath, xgd1SSPath))
{
@@ -443,7 +443,7 @@ namespace MPF.Processors
File.Copy(xgd2SSPath, xgd2RawSSPath);
}
catch { }
// Repair, clean, and validate SS before adding hash to submission info
if (ProcessingTool.FixSS(xgd2SSPath, xgd2SSPath))
{
@@ -834,7 +834,7 @@ namespace MPF.Processors
? OutputFileFlags.Required | OutputFileFlags.Binary | OutputFileFlags.Zippable
: OutputFileFlags.Binary | OutputFileFlags.Zippable,
"ss"),
new($"{outputFilename}_RawSS.bin",
new($"{outputFilename}_RawSS.bin",
OutputFileFlags.Binary | OutputFileFlags.Zippable,
"raw_ss"),
];

View File

@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
#if NET35_OR_GREATER || NETCOREAPP
using System.Linq;
#endif
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;

View File

@@ -324,7 +324,7 @@ namespace MPF.Processors
string? pfiCrc = HashTool.GetFileHash($"{basePath}.pfi", HashType.CRC32);
if (pfiCrc is not null)
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.PFIHash] = pfiCrc.ToUpperInvariant();
// Only record SS hash if it is valid
if (ProcessingTool.IsFixedSS($"{basePath}.ss"))
{