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

Method titleAt

3ds/source/script/scripthost.cpp:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 int titleCount(void) override { return TitleCatalog::get().getTitleCount(BackupKind::Save); }
73
74 bool titleAt(int idx, HostTitle& out) override
75 {
76 if (idx < 0 || idx >= titleCount()) {
77 return false;
78 }
79 Title title;
80 TitleCatalog::get().getTitle(title, idx, BackupKind::Save);
81 out.id = title.id();
82 out.name = title.longDescription();
83 out.productCode = title.productCode;
84 out.isCart = title.mediaType() == MEDIATYPE_GAME_CARD;
85 out.hasSave = title.accessibleSave();
86 out.hasExtdata = title.accessibleExtdata();
87 return true;
88 }
89
90 int titleIndexOf(uint64_t id) override { return TitleCatalog::get().indexById((u64)id, BackupKind::Save); }
91

Callers 1

titleArgFunction · 0.45

Calls 6

getFunction · 0.85
mediaTypeMethod · 0.80
accessibleSaveMethod · 0.80
accessibleExtdataMethod · 0.80
getTitleMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected