| 1889 | } |
| 1890 | |
| 1891 | void FolderMemoryCard::DeleteFromIndex(const std::string& filePath, const std::string_view entry) const |
| 1892 | { |
| 1893 | const std::string indexName(Path::Combine(filePath, "_pcsx2_index")); |
| 1894 | |
| 1895 | std::optional<ryml::Tree> yaml = loadYamlFile(indexName.c_str()); |
| 1896 | if (yaml.has_value() && !yaml.value().empty()) |
| 1897 | { |
| 1898 | ryml::NodeRef index = yaml.value().rootref(); |
| 1899 | |
| 1900 | if (index.has_child(ryml::csubstr(entry.data(), entry.length()))) |
| 1901 | { |
| 1902 | index.remove_child(ryml::csubstr(entry.data(), entry.length())); |
| 1903 | // Write out the changes |
| 1904 | SaveYAMLToFile(indexName.c_str(), index); |
| 1905 | } |
| 1906 | } |
| 1907 | } |
| 1908 | |
| 1909 | // from http://www.oocities.org/siliconvalley/station/8269/sma02/sma02.html#ECC |
| 1910 | void FolderMemoryCard::CalculateECC(u8* ecc, const u8* data) |
nothing calls this directly
no test coverage detected