The extras: Checkpoint keeps two title lists, and a title whose save is not reachable but whose extdata is lives in the Extdata one alone — PKSM's archive, which loader.cpp probes for by id, is the case every user meets. The Save list on its own would hide those titles from every script while the app's own UI offers them, so the script index space is the Save list with them appended: existing indi
| 566 | // Rebuilt when the catalog's generation moves, because a script may be |
| 567 | // running while the loader thread finishes a refresh. |
| 568 | void refreshExtras(void) |
| 569 | { |
| 570 | TitleCatalog& catalog = TitleCatalog::get(); |
| 571 | const u32 generation = catalog.generation(); |
| 572 | if (mExtrasGeneration == generation) { |
| 573 | return; |
| 574 | } |
| 575 | mExtrasGeneration = generation; |
| 576 | mSaveCount = catalog.getTitleCount(BackupKind::Save); |
| 577 | mExtras.clear(); |
| 578 | |
| 579 | const int extdatas = catalog.getTitleCount(BackupKind::Extdata); |
| 580 | for (int i = 0; i < extdatas; i++) { |
| 581 | Title title; |
| 582 | catalog.getTitle(title, i, BackupKind::Extdata); |
| 583 | if (catalog.indexById(title.id(), BackupKind::Save) < 0) { |
| 584 | mExtras.push_back(Extra{i, title.id()}); |
| 585 | } |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | // The title behind a script-space index, false when there is none. |
| 590 | bool catalogTitle(int idx, Title& out) |
nothing calls this directly
no test coverage detected