From cc315cb7afa26693979d6faf43bedd6dd50722e1 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Thu, 9 Jun 2022 00:25:11 +0200 Subject: DiscIO/Riivolution: Add dolphin-specific extensions "dolphin_sys_file" and "dolphin_sys_folder" to patch sys files like you would patch regular files. --- Source/Core/DiscIO/RiivolutionParser.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Source/Core/DiscIO/RiivolutionParser.cpp') diff --git a/Source/Core/DiscIO/RiivolutionParser.cpp b/Source/Core/DiscIO/RiivolutionParser.cpp index 283e5876df..dacbbbcfc5 100644 --- a/Source/Core/DiscIO/RiivolutionParser.cpp +++ b/Source/Core/DiscIO/RiivolutionParser.cpp @@ -172,9 +172,10 @@ std::optional ParseString(std::string_view xml, std::string xml_path) for (const auto& patch_subnode : patch_node.children()) { const std::string_view patch_name(patch_subnode.name()); - if (patch_name == "file") + if (patch_name == "file" || patch_name == "dolphin_sys_file") { - auto& file = patch.m_file_patches.emplace_back(); + auto& file = patch_name == "dolphin_sys_file" ? patch.m_sys_file_patches.emplace_back() : + patch.m_file_patches.emplace_back(); file.m_disc = patch_subnode.attribute("disc").as_string(); file.m_external = patch_subnode.attribute("external").as_string(); file.m_resize = patch_subnode.attribute("resize").as_bool(true); @@ -183,9 +184,11 @@ std::optional ParseString(std::string_view xml, std::string xml_path) file.m_fileoffset = patch_subnode.attribute("fileoffset").as_uint(0); file.m_length = patch_subnode.attribute("length").as_uint(0); } - else if (patch_name == "folder") + else if (patch_name == "folder" || patch_name == "dolphin_sys_folder") { - auto& folder = patch.m_folder_patches.emplace_back(); + auto& folder = patch_name == "dolphin_sys_folder" ? + patch.m_sys_folder_patches.emplace_back() : + patch.m_folder_patches.emplace_back(); folder.m_disc = patch_subnode.attribute("disc").as_string(); folder.m_external = patch_subnode.attribute("external").as_string(); folder.m_resize = patch_subnode.attribute("resize").as_bool(true); -- cgit v1.2.3