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

Method update

switch/source/UpdateOverlay.cpp:101–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void UpdateOverlay::update(const InputState&)
102{
103 if (!mFinished.load(std::memory_order_acquire)) {
104 return;
105 }
106 if (mWorker.joinable()) {
107 mWorker.join();
108 }
109
110 if (mOutcome == AutoUpdater::Outcome::Installed) {
111 // Leave the modal up: main() ends the loop on this call, so the last
112 // frame the user sees is the finished transfer rather than a flash of
113 // the title grid.
114 if (mOnInstalled) {
115 mOnInstalled();
116 }
117 return;
118 }
119
120 Screen& current = screen;
121 dismissThen([&current]() {
122 std::shared_ptr<Overlay> error = std::make_shared<InfoOverlay>(current, i18n::t("updater.install_failed"));
123 current.setOverlay(error);
124 });
125}

Callers

nothing calls this directly

Calls 3

setOverlayMethod · 0.80
loadMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected