diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2021-09-28 06:12:45 +0200 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2021-10-24 00:09:07 +0200 |
| commit | 6ec4af7ea413ace595290d336bd88b30e035fa2f (patch) | |
| tree | 9d5311964ec3f7225de203886c16688fbdf00dd3 /Source/Core/DolphinQt/RiivolutionBootWidget.cpp | |
| parent | 175f225ac1daa1f50badb8858137b1e91b067073 (diff) | |
RiivolutionPatcher: Load external files with a layer of indirection during the patching process to properly resolve the paths given in the XML.
This also may eventually allow loading patches from sources other than the 1:1 expected file structure host file system, such as memory or an archive file.
Diffstat (limited to 'Source/Core/DolphinQt/RiivolutionBootWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/RiivolutionBootWidget.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/Core/DolphinQt/RiivolutionBootWidget.cpp b/Source/Core/DolphinQt/RiivolutionBootWidget.cpp index 9c74412da5..0bce197adc 100644 --- a/Source/Core/DolphinQt/RiivolutionBootWidget.cpp +++ b/Source/Core/DolphinQt/RiivolutionBootWidget.cpp @@ -16,8 +16,8 @@ #include "Common/FileSearch.h" #include "Common/FileUtil.h" -#include "Common/StringUtil.h" #include "DiscIO/RiivolutionParser.h" +#include "DiscIO/RiivolutionPatcher.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" struct GuiRiivolutionPatchIndex @@ -178,13 +178,11 @@ void RiivolutionBootWidget::BootGame() { auto patches = disc.GeneratePatches(m_game_id); - // set the root path for each patch + // set the file loader for each patch for (auto& patch : patches) { - if (patch.m_root.empty()) - SplitPath(disc.m_xml_path, &patch.m_root, nullptr, nullptr); - else - patch.m_root = riivolution_dir + "/" + patch.m_root; + patch.m_file_data_loader = std::make_shared<DiscIO::Riivolution::FileDataLoaderHostFS>( + riivolution_dir, disc.m_xml_path, patch.m_root); } m_patches.insert(m_patches.end(), patches.begin(), patches.end()); |
