MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / exportTitleListCache

Method exportTitleListCache

3ds/source/loader.cpp:224–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224void TitleCatalog::exportTitleListCache(std::vector<Title>& list, const std::u16string& path, IconStore& icons)
225{
226 const size_t bytes = list.size() * TitleCache::ENTRY_SIZE;
227 std::unique_ptr<u8[]> cache = std::unique_ptr<u8[]>(new u8[bytes]());
228 for (size_t i = 0; i < list.size(); i++) {
229 TitleCache::encode(cache.get() + i * TitleCache::ENTRY_SIZE, list.at(i), icons);
230 }
231
232 FSUSER_DeleteFile(Archive::sdmc(), fsMakePath(PATH_UTF16, path.data()));
233 FSStream output(Archive::sdmc(), path, FS_OPEN_WRITE, bytes);
234 output.write(cache.get(), bytes);
235 output.close();
236}
237
238void TitleCatalog::importTitleListCache(std::vector<Title>& saves, std::vector<Title>& extdatas, IconStore& icons)
239{

Callers

nothing calls this directly

Calls 7

encodeFunction · 0.85
atMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45
dataMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected