diff --git a/emulators/rpcs3/files/patch-pugixml-1.14 b/emulators/rpcs3/files/patch-pugixml-1.14 index c22392a8a9c0..ccb54b8dfe02 100644 --- a/emulators/rpcs3/files/patch-pugixml-1.14 +++ b/emulators/rpcs3/files/patch-pugixml-1.14 @@ -1,69 +1,80 @@ Revert https://github.com/RPCS3/rpcs3/commit/196617183870 until textproc/pugixml >= 1.15 update +--- 3rdparty/CMakeLists.txt.orig 2025-01-22 19:47:07 UTC ++++ 3rdparty/CMakeLists.txt +@@ -44,7 +44,7 @@ if (USE_SYSTEM_PUGIXML) + + # pugixml + if (USE_SYSTEM_PUGIXML) +- pkg_check_modules(PUGIXML REQUIRED IMPORTED_TARGET pugixml>=1.15) ++ pkg_check_modules(PUGIXML REQUIRED IMPORTED_TARGET pugixml>=1.11) + add_library(pugixml INTERFACE) + target_link_libraries(pugixml INTERFACE PkgConfig::PUGIXML) + else() --- Utilities/File.cpp.orig 2025-01-15 23:43:33 UTC +++ Utilities/File.cpp @@ -21,7 +21,7 @@ using namespace std::literals::string_literals; #include #include -static std::unique_ptr to_wchar(std::string_view source) +static std::unique_ptr to_wchar(const std::string& source) { // String size + null terminator const usz buf_size = source.size() + 1; @@ -44,7 +44,7 @@ static std::unique_ptr to_wchar(std::string std::memcpy(buffer.get() + 32768 + 4, L"UNC\\", 4 * sizeof(wchar_t)); } - ensure(MultiByteToWideChar(CP_UTF8, 0, source.data(), size, buffer.get() + 32768 + (unc ? 8 : 4), size)); // "to_wchar" + ensure(MultiByteToWideChar(CP_UTF8, 0, source.c_str(), size, buffer.get() + 32768 + (unc ? 8 : 4), size)); // "to_wchar" // Canonicalize wide path (replace '/', ".", "..", \\ repetitions, etc) ensure(GetFullPathNameW(buffer.get() + 32768, 32768, buffer.get(), nullptr) - 1 < 32768 - 1); // "to_wchar" --- Utilities/rXml.cpp.orig 2025-01-15 23:43:33 UTC +++ Utilities/rXml.cpp @@ -49,11 +49,12 @@ std::string rXmlNode::GetName() return {}; } -std::string rXmlNode::GetAttribute(std::string_view name) +std::string rXmlNode::GetAttribute(const std::string& name) { if (handle) { - if (const pugi::xml_attribute attr = handle.attribute(name)) + const auto pred = [&name](const pugi::xml_attribute& attr) { return (name == attr.name()); }; + if (const pugi::xml_attribute attr = handle.find_attribute(pred)) { if (const pugi::char_t* value = attr.value()) { @@ -85,7 +86,7 @@ rXmlDocument::rXmlDocument() { } -pugi::xml_parse_result rXmlDocument::Read(std::string_view data) +pugi::xml_parse_result rXmlDocument::Read(const std::string& data) { if (handle) { --- Utilities/rXml.h.orig 2025-01-15 23:43:33 UTC +++ Utilities/rXml.h @@ -23,7 +23,7 @@ struct rXmlNode std::shared_ptr GetChildren(); std::shared_ptr GetNext(); std::string GetName(); - std::string GetAttribute(std::string_view name); + std::string GetAttribute(const std::string& name); std::string GetNodeContent(); pugi::xml_node handle{}; @@ -34,7 +34,7 @@ struct rXmlDocument rXmlDocument(); rXmlDocument(const rXmlDocument& other) = delete; rXmlDocument &operator=(const rXmlDocument& other) = delete; - pugi::xml_parse_result Read(std::string_view data); + pugi::xml_parse_result Read(const std::string& data); virtual std::shared_ptr GetRoot(); pugi::xml_document handle{};