mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-01 00:38:34 +00:00
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.
This commit is contained in:
parent
175f225ac1
commit
6ec4af7ea4
5 changed files with 260 additions and 51 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue