mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[SabreTools] Use UpdateParallel by default
This commit is contained in:
@@ -135,6 +135,8 @@ namespace SabreTools
|
|||||||
/// <param name="clean">True to clean the game names to WoD standard, false otherwise (default)</param>
|
/// <param name="clean">True to clean the game names to WoD standard, false otherwise (default)</param>
|
||||||
/// <param name="softlist">True to allow SL DATs to have game names used instead of descriptions, false otherwise (default)</param>
|
/// <param name="softlist">True to allow SL DATs to have game names used instead of descriptions, false otherwise (default)</param>
|
||||||
/// <param name="dedup">True to dedupe the roms in the DAT, false otherwise (default)</param>
|
/// <param name="dedup">True to dedupe the roms in the DAT, false otherwise (default)</param>
|
||||||
|
/// /* Multithreading info */
|
||||||
|
/// <param name="maxDegreeOfParallelism">Integer representing the maximum amount of parallelization to be used</param>
|
||||||
private static void InitUpdate(List<string> inputs,
|
private static void InitUpdate(List<string> inputs,
|
||||||
/* Normal DAT header info */
|
/* Normal DAT header info */
|
||||||
string filename,
|
string filename,
|
||||||
@@ -200,7 +202,10 @@ namespace SabreTools
|
|||||||
string outdir,
|
string outdir,
|
||||||
bool clean,
|
bool clean,
|
||||||
bool softlist,
|
bool softlist,
|
||||||
bool dedup)
|
bool dedup,
|
||||||
|
|
||||||
|
/* Multithreading info */
|
||||||
|
int maxDegreeOfParallelism)
|
||||||
{
|
{
|
||||||
// Set the special flags
|
// Set the special flags
|
||||||
ForceMerging fm = ForceMerging.None;
|
ForceMerging fm = ForceMerging.None;
|
||||||
@@ -321,37 +326,37 @@ namespace SabreTools
|
|||||||
if (outputCMP)
|
if (outputCMP)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.ClrMamePro;
|
userInputDat.OutputFormat = OutputFormat.ClrMamePro;
|
||||||
DatTools.Update(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
DatTools.UpdateParallel(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
||||||
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, _logger);
|
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, maxDegreeOfParallelism, _logger);
|
||||||
}
|
}
|
||||||
if (outputMiss || tsv != null)
|
if (outputMiss || tsv != null)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.MissFile;
|
userInputDat.OutputFormat = OutputFormat.MissFile;
|
||||||
DatTools.Update(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
DatTools.UpdateParallel(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
||||||
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, _logger);
|
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, maxDegreeOfParallelism, _logger);
|
||||||
}
|
}
|
||||||
if (outputRC)
|
if (outputRC)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.RomCenter;
|
userInputDat.OutputFormat = OutputFormat.RomCenter;
|
||||||
DatTools.Update(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
DatTools.UpdateParallel(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
||||||
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, _logger);
|
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, maxDegreeOfParallelism, _logger);
|
||||||
}
|
}
|
||||||
if (outputSD)
|
if (outputSD)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.SabreDat;
|
userInputDat.OutputFormat = OutputFormat.SabreDat;
|
||||||
DatTools.Update(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
DatTools.UpdateParallel(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
||||||
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, _logger);
|
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, maxDegreeOfParallelism, _logger);
|
||||||
}
|
}
|
||||||
if (outputXML)
|
if (outputXML)
|
||||||
{
|
{
|
||||||
userInputDat.OutputFormat = OutputFormat.Xml;
|
userInputDat.OutputFormat = OutputFormat.Xml;
|
||||||
DatTools.Update(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
DatTools.UpdateParallel(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
||||||
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, _logger);
|
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, maxDegreeOfParallelism, _logger);
|
||||||
}
|
}
|
||||||
if (!outputCMP && !(outputMiss || tsv != null) && !outputRC && !outputSD && !outputXML)
|
if (!outputCMP && !(outputMiss || tsv != null) && !outputRC && !outputSD && !outputXML)
|
||||||
{
|
{
|
||||||
DatTools.Update(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
DatTools.UpdateParallel(inputs, userInputDat, outdir, merge, diff, cascade, inplace, skip, bare, clean, softlist,
|
||||||
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, _logger);
|
gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, maxDegreeOfParallelism, _logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ namespace SabreTools
|
|||||||
InitUpdate(inputs, filename, name, description, rootdir, category, version, date, author, email, homepage, url, comment, header,
|
InitUpdate(inputs, filename, name, description, rootdir, category, version, date, author, email, homepage, url, comment, header,
|
||||||
superdat, forcemerge, forcend, forcepack, outputCMP, outputMiss, outputRC, outputSD, outputXML, usegame, prefix,
|
superdat, forcemerge, forcend, forcepack, outputCMP, outputMiss, outputRC, outputSD, outputXML, usegame, prefix,
|
||||||
postfix, quotes, repext, addext, datprefix, romba, tsv, merge, diff, cascade, inplace, skip, bare, gamename, romname,
|
postfix, quotes, repext, addext, datprefix, romba, tsv, merge, diff, cascade, inplace, skip, bare, gamename, romname,
|
||||||
romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, outdir, clean, softlist, dedup);
|
romtype, sgt, slt, seq, crc, md5, sha1, nodump, trim, single, root, outdir, clean, softlist, dedup, maxParallelism);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a source or system
|
// Add a source or system
|
||||||
|
|||||||
Reference in New Issue
Block a user