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

Method appendCartTitle

3ds/source/loader.cpp:529–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529void TitleCatalog::appendCartTitle(std::vector<Title>& saves, std::vector<Title>& extdatas, IconStore& icons)
530{
531 FS_CardType cardType;
532 Result res = FSUSER_GetCardType(&cardType);
533 if (R_FAILED(res)) {
534 return;
535 }
536
537 if (cardType == CARD_CTR) {
538 u32 count = 0;
539 AM_GetTitleCount(MEDIATYPE_GAME_CARD, &count);
540 if (count > 0) {
541 std::unique_ptr<u64[]> ids = std::unique_ptr<u64[]>(new u64[count]);
542 AM_GetTitleList(NULL, MEDIATYPE_GAME_CARD, count, ids.get());
543 if (validId(ids[0])) {
544 Title title;
545 if (TitleProbe::probe(title, ids[0], MEDIATYPE_GAME_CARD, cardType, icons)) {
546 if (title.accessibleSave()) {
547 saves.insert(saves.begin(), title);
548 }
549
550 if (title.accessibleExtdata()) {
551 extdatas.insert(extdatas.begin(), title);
552 }
553 }
554 }
555 mCounter++;
556 }
557 }
558 else {
559 Title title;
560 if (TitleProbe::probe(title, 0, MEDIATYPE_GAME_CARD, cardType, icons)) {
561 saves.insert(saves.begin(), title);
562 }
563 mCounter++;
564 }
565}
566
567void TitleCatalog::loadTitles(bool forceRefreshParam)
568{

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