don't return from usb menu on error, wait until the user presses B
This commit is contained in:
@@ -123,11 +123,11 @@ void Menu::Update(Controller* controller, TouchInfo* touch) {
|
|||||||
}, [this](bool result){
|
}, [this](bool result){
|
||||||
if (result) {
|
if (result) {
|
||||||
App::Notify("Usb install success!"_i18n);
|
App::Notify("Usb install success!"_i18n);
|
||||||
|
m_state = State::Done;
|
||||||
} else {
|
} else {
|
||||||
App::Notify("Usb install failed!"_i18n);
|
App::Notify("Usb install failed!"_i18n);
|
||||||
|
m_state = State::Failed;
|
||||||
}
|
}
|
||||||
m_state = State::Done;
|
|
||||||
this->SetPop();
|
|
||||||
}));
|
}));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -161,12 +161,11 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case State::Done:
|
case State::Done:
|
||||||
gfx::drawTextArgs(vg, SCREEN_WIDTH / 2.f, SCREEN_HEIGHT / 2.f, 36.f, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT_INFO), "Press B to Exit..."_i18n.c_str());
|
gfx::drawTextArgs(vg, SCREEN_WIDTH / 2.f, SCREEN_HEIGHT / 2.f, 36.f, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT_INFO), "Press B to exit..."_i18n.c_str());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case State::Failed:
|
case State::Failed:
|
||||||
gfx::drawTextArgs(vg, SCREEN_WIDTH / 2.f, SCREEN_HEIGHT / 2.f, 36.f, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT_INFO), "Failed to init usb..."_i18n.c_str());
|
gfx::drawTextArgs(vg, SCREEN_WIDTH / 2.f, SCREEN_HEIGHT / 2.f, 36.f, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE, theme->GetColour(ThemeEntryID_TEXT_INFO), "Failed to init usb, press B to exit..."_i18n.c_str());
|
||||||
this->SetPop();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user