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

Method titleAt

switch/source/script/scripthost.cpp:90–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 int titleCount(void) override { return (int)TitleCatalog::get().getTitleCount(g_currentUId); }
89
90 bool titleAt(int idx, HostTitle& out) override
91 {
92 if (idx < 0 || idx >= titleCount()) {
93 return false;
94 }
95 Title title;
96 TitleCatalog::get().getTitle(title, g_currentUId, (size_t)idx);
97 out.id = title.id();
98 out.name = title.displayName();
99 // Every catalog entry on Switch *is* an installed save.
100 out.hasSave = true;
101 return true;
102 }
103
104 int titleIndexOf(uint64_t id) override { return TitleCatalog::get().indexById(g_currentUId, (u64)id); }
105

Callers

nothing calls this directly

Calls 4

getFunction · 0.85
displayNameMethod · 0.80
getTitleMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected