diff options
Diffstat (limited to 'Source/Core/DiscIO/RiivolutionPatcher.cpp')
| -rw-r--r-- | Source/Core/DiscIO/RiivolutionPatcher.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Core/DiscIO/RiivolutionPatcher.cpp b/Source/Core/DiscIO/RiivolutionPatcher.cpp index a9593dddcd..8ad65f8c57 100644 --- a/Source/Core/DiscIO/RiivolutionPatcher.cpp +++ b/Source/Core/DiscIO/RiivolutionPatcher.cpp @@ -458,15 +458,20 @@ static void ApplyFolderPatchToFST(const Patch& patch, const Folder& folder, ApplyFolderPatchToFST(patch, folder, fst, dol_node, folder.m_disc, folder.m_external); } -void ApplyPatchesToFiles(const std::vector<Patch>& patches, +void ApplyPatchesToFiles(const std::vector<Patch>& patches, PatchIndex index, std::vector<DiscIO::FSTBuilderNode>* fst, DiscIO::FSTBuilderNode* dol_node) { for (const auto& patch : patches) { - for (const auto& file : patch.m_file_patches) + const auto& file_patches = + index == PatchIndex::DolphinSysFiles ? patch.m_sys_file_patches : patch.m_file_patches; + const auto& folder_patches = + index == PatchIndex::DolphinSysFiles ? patch.m_sys_folder_patches : patch.m_folder_patches; + + for (const auto& file : file_patches) ApplyFilePatchToFST(patch, file, fst, dol_node); - for (const auto& folder : patch.m_folder_patches) + for (const auto& folder : folder_patches) ApplyFolderPatchToFST(patch, folder, fst, dol_node); } } |
