| 80 | } |
| 81 | |
| 82 | void TitlePickerOverlay::update(const InputState& input) |
| 83 | { |
| 84 | (void)input; |
| 85 | const int count = rowCount(); |
| 86 | mHid.update(count > 0 ? count : 1); |
| 87 | |
| 88 | u32 kDown = hidKeysDown(); |
| 89 | if ((kDown & KEY_A) && count > 0) { |
| 90 | Title title; |
| 91 | TitleCatalog::get().getTitle(title, mHid.fullIndex(), BackupKind::Save); |
| 92 | u64 id = title.id(); |
| 93 | auto pick = mOnPick; // copy to the stack: removeOverlay() destroys *this |
| 94 | screen.removeOverlay(); // dismiss the picker before running the callback |
| 95 | pick(id); |
| 96 | return; |
| 97 | } |
| 98 | if (kDown & KEY_B) { |
| 99 | screen.removeOverlay(); |
| 100 | return; |
| 101 | } |
| 102 | } |
nothing calls this directly
no test coverage detected