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

Method update

3ds/source/TitlePickerOverlay.cpp:82–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void 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}

Callers

nothing calls this directly

Calls 5

getFunction · 0.85
fullIndexMethod · 0.80
removeOverlayMethod · 0.80
getTitleMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected