mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] Full non-merged should remove redundant sets
This commit is contained in:
@@ -395,8 +395,11 @@ namespace SabreTools.Helper.Dats
|
|||||||
// Now that we have looped through the cloneof tags, we loop through the romof tags
|
// Now that we have looped through the cloneof tags, we loop through the romof tags
|
||||||
AddRomsFromBios(logger);
|
AddRomsFromBios(logger);
|
||||||
|
|
||||||
// Finally, remove the romof and cloneof tags so it's not picked up by the manager
|
// Then, remove the romof and cloneof tags so it's not picked up by the manager
|
||||||
RemoveTagsFromChild(logger);
|
RemoveTagsFromChild(logger);
|
||||||
|
|
||||||
|
// Finally, remove all sets that are labeled as bios or device
|
||||||
|
RemoveBiosAndDeviceSets(logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -819,6 +822,24 @@ namespace SabreTools.Helper.Dats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remove all BIOS and device sets
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="logger"></param>
|
||||||
|
private void RemoveBiosAndDeviceSets(Logger logger)
|
||||||
|
{
|
||||||
|
List<string> games = Keys.ToList();
|
||||||
|
foreach (string game in games)
|
||||||
|
{
|
||||||
|
if (this[game].Count > 0
|
||||||
|
&& (this[game][0].Machine.MachineType == MachineType.Bios
|
||||||
|
|| this[game][0].Machine.MachineType == MachineType.Device))
|
||||||
|
{
|
||||||
|
Remove(game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use romof tags to remove roms from the children
|
/// Use romof tags to remove roms from the children
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user