diff --git a/SabreTools.Helper/Dats/Partials/DatFile.ConvertUpdate.cs b/SabreTools.Helper/Dats/Partials/DatFile.ConvertUpdate.cs index b06a8d9e..954d60d6 100644 --- a/SabreTools.Helper/Dats/Partials/DatFile.ConvertUpdate.cs +++ b/SabreTools.Helper/Dats/Partials/DatFile.ConvertUpdate.cs @@ -34,13 +34,15 @@ namespace SabreTools.Helper.Dats /// True to clean the game names to WoD standard, false otherwise (default) /// True to allow SL DATs to have game names used instead of descriptions, false otherwise (default) /// Filter object to be passed to the DatItem level + /// Type of the split that should be performed (split, merged, fully merged) /// True if we are supposed to trim names to NTFS length, false otherwise /// True if all games should be replaced by '!', false otherwise /// String representing root directory to compare against for length calculation /// Integer representing the maximum amount of parallelization to be used /// Logging object for console and file output public void DetermineUpdateType(List inputPaths, string outDir, bool merge, DiffMode diff, bool inplace, bool skip, - bool bare, bool clean, bool softlist, Filter filter, bool trim, bool single, string root, int maxDegreeOfParallelism, Logger logger) + bool bare, bool clean, bool softlist, Filter filter, SplitType splitType, bool trim, bool single, string root, + int maxDegreeOfParallelism, Logger logger) { // If we're in merging or diffing mode, use the full list of inputs if (merge || diff != 0) @@ -56,7 +58,7 @@ namespace SabreTools.Helper.Dats // Create a dictionary of all ROMs from the input DATs List datHeaders = PopulateUserData(newInputFileNames, inplace, clean, softlist, - outDir, filter, trim, single, root, maxDegreeOfParallelism, logger); + outDir, filter, splitType, trim, single, root, maxDegreeOfParallelism, logger); // Modify the Dictionary if necessary and output the results if (diff != 0 && diff < DiffMode.Cascade) @@ -77,7 +79,7 @@ namespace SabreTools.Helper.Dats // Otherwise, loop through all of the inputs individually else { - Update(inputPaths, outDir, clean, softlist, filter, trim, single, root, maxDegreeOfParallelism, logger); + Update(inputPaths, outDir, clean, softlist, filter, splitType, trim, single, root, maxDegreeOfParallelism, logger); } return; } @@ -85,6 +87,7 @@ namespace SabreTools.Helper.Dats /// /// Populate the user DatData object from the input files /// + /// Type of the split that should be performed (split, merged, fully merged) /// Filter object to be passed to the DatItem level /// True if we are supposed to trim names to NTFS length, false otherwise /// True if all games should be replaced by '!', false otherwise @@ -93,7 +96,7 @@ namespace SabreTools.Helper.Dats /// Logging object for console and file output /// List of DatData objects representing headers private List PopulateUserData(List inputs, bool inplace, bool clean, bool softlist, string outDir, - Filter filter, bool trim, bool single, string root, int maxDegreeOfParallelism, Logger logger) + Filter filter, SplitType splitType, bool trim, bool single, string root, int maxDegreeOfParallelism, Logger logger) { DatFile[] datHeaders = new DatFile[inputs.Count]; DateTime start = DateTime.Now; @@ -439,13 +442,14 @@ namespace SabreTools.Helper.Dats /// True to clean the game names to WoD standard, false otherwise (default) /// True to allow SL DATs to have game names used instead of descriptions, false otherwise (default) /// Filter object to be passed to the DatItem level + /// Type of the split that should be performed (split, merged, fully merged) /// True if we are supposed to trim names to NTFS length, false otherwise /// True if all games should be replaced by '!', false otherwise /// String representing root directory to compare against for length calculation /// Integer representing the maximum amount of parallelization to be used /// Logging object for console and file output public void Update(List inputFileNames, string outDir, bool clean, bool softlist, Filter filter, - bool trim, bool single, string root, int maxDegreeOfParallelism, Logger logger) + SplitType splitType, bool trim, bool single, string root, int maxDegreeOfParallelism, Logger logger) { Parallel.ForEach(inputFileNames, new ParallelOptions { MaxDegreeOfParallelism = maxDegreeOfParallelism }, diff --git a/SabreTools/Partials/SabreTools_Inits.cs b/SabreTools/Partials/SabreTools_Inits.cs index d6cfe9a5..88112b46 100644 --- a/SabreTools/Partials/SabreTools_Inits.cs +++ b/SabreTools/Partials/SabreTools_Inits.cs @@ -448,6 +448,7 @@ namespace SabreTools /// Select games without the given type /// Select games with the given runability /// /* Trimming info */ + /// Type of the split that should be performed (split, merged, fully merged) /// True if we are supposed to trim names to NTFS length, false otherwise /// True if all games should be replaced by '!', false otherwise /// String representing root directory to compare against for length calculation @@ -521,6 +522,7 @@ namespace SabreTools bool? runnable, /* Trimming info */ + SplitType splitType, bool trim, bool single, string root, @@ -654,6 +656,7 @@ namespace SabreTools case "bios": machineNotType = MachineType.Bios; break; + case "dev": case "device": machineNotType = MachineType.Device; break; @@ -737,7 +740,7 @@ namespace SabreTools notgamename, notromname, notromtype, notcrc, notmd5, notsha1, itemNotStatus, machineNotType, runnable); userInputDat.DetermineUpdateType(inputs, outDir, merge, diffMode, inplace, skip, bare, clean, softlist, - filter, trim, single, root, maxDegreeOfParallelism, _logger); + filter, splitType, trim, single, root, maxDegreeOfParallelism, _logger); } /// diff --git a/SabreTools/SabreTools.cs b/SabreTools/SabreTools.cs index dade00ad..a42940e3 100644 --- a/SabreTools/SabreTools.cs +++ b/SabreTools/SabreTools.cs @@ -1080,7 +1080,7 @@ namespace SabreTools postfix, quotes, repext, addext, remext, datPrefix, romba, merge, diffMode, inplace, skip, removeDateFromAutomaticName, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, status, gametype, notgamename, notromname, notromtype, notcrc, notmd5, notsha1, notstatus, notgametype, runnable, - trim, single, root, outDir, cleanGameNames, softlist, dedup, maxParallelism); + splitType, trim, single, root, outDir, cleanGameNames, softlist, dedup, maxParallelism); } // If we're using the verifier