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

Method appendCartTitle

3ds/source/loader.cpp:541–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541void TitleCatalog::appendCartTitle(std::vector<Title>& saves, std::vector<Title>& extdatas, IconStore& icons)
542{
543 FS_CardType cardType;
544 Result res = FSUSER_GetCardType(&cardType);
545 if (R_FAILED(res)) {
546 return;
547 }
548
549 if (cardType == CARD_CTR) {
550 u32 count = 0;
551 AM_GetTitleCount(MEDIATYPE_GAME_CARD, &count);
552 if (count > 0) {
553 std::unique_ptr<u64[]> ids = std::unique_ptr<u64[]>(new u64[count]);
554 AM_GetTitleList(NULL, MEDIATYPE_GAME_CARD, count, ids.get());
555 if (validId(ids[0])) {
556 Title title;
557 if (TitleProbe::probe(title, ids[0], MEDIATYPE_GAME_CARD, cardType, icons)) {
558 if (title.accessibleSave()) {
559 saves.insert(saves.begin(), title);
560 }
561
562 if (title.accessibleExtdata()) {
563 extdatas.insert(extdatas.begin(), title);
564 }
565 }
566 }
567 mCounter++;
568 }
569 }
570 else {
571 Title title;
572 if (TitleProbe::probe(title, 0, MEDIATYPE_GAME_CARD, cardType, icons)) {
573 saves.insert(saves.begin(), title);
574 }
575 mCounter++;
576 }
577}
578
579void TitleCatalog::loadTitles(bool forceRefreshParam)
580{

Callers

nothing calls this directly

Calls 5

accessibleSaveMethod · 0.80
accessibleExtdataMethod · 0.80
getMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected