MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / read_patch_node

Method read_patch_node

rpcs3/util/bin_patch.cpp:875–900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873}
874
875bool patch_engine::read_patch_node(patch_info& info, YAML::Node node, const YAML::Node& root, std::string_view path, std::stringstream* log_messages)
876{
877 if (!node)
878 {
879 append_log_message(log_messages, fmt::format("Skipping invalid patch node %s. (key: %s, location: %s)", info.description, info.hash, get_yaml_node_location(node)), &patch_log.error);
880 return false;
881 }
882
883 if (const auto yml_type = node.Type(); yml_type != YAML::NodeType::Sequence)
884 {
885 append_log_message(log_messages, fmt::format("Skipping patch node %s: expected Sequence, found %s (key: %s, location: %s)", info.description, yml_type, info.hash, get_yaml_node_location(node)), &patch_log.error);
886 return false;
887 }
888
889 bool is_valid = true;
890
891 for (auto patch : node)
892 {
893 if (!add_patch_data(patch, info, 0, root, path, log_messages))
894 {
895 is_valid = false;
896 }
897 }
898
899 return is_valid;
900}
901
902void patch_engine::append_global_patches()
903{

Callers

nothing calls this directly

Calls 3

append_log_messageFunction · 0.85
get_yaml_node_locationFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected