Fix selecting one nsp acting wonky

This commit is contained in:
Huntereb 2019-11-10 12:47:45 -05:00
parent 1374370c78
commit 5cd7d2b8b0
2 changed files with 2 additions and 4 deletions

View file

@ -127,9 +127,8 @@ namespace inst::ui {
} }
if ((Down & KEY_A) || (Up & KEY_TOUCH)) { if ((Down & KEY_A) || (Up & KEY_TOUCH)) {
netInstPage::selectNsp(this->menu->GetSelectedIndex()); netInstPage::selectNsp(this->menu->GetSelectedIndex());
if (this->menu->GetItems().size() == 1) { if (this->menu->GetItems().size() == 1 && netInstPage::selectedUrls.size() == 1) {
netInstPage::startInstall(false); netInstPage::startInstall(false);
netInstPage::selectNsp(this->menu->GetSelectedIndex());
} }
} }
if ((Down & KEY_Y)) { if ((Down & KEY_Y)) {

View file

@ -79,9 +79,8 @@ namespace inst::ui {
} }
if ((Down & KEY_A) || (Up & KEY_TOUCH)) { if ((Down & KEY_A) || (Up & KEY_TOUCH)) {
nspInstPage::selectNsp(this->menu->GetSelectedIndex()); nspInstPage::selectNsp(this->menu->GetSelectedIndex());
if (this->menu->GetItems().size() == 1) { if (this->menu->GetItems().size() == 1 && nspInstPage::selectedNsps.size() == 1) {
nspInstPage::startInstall(); nspInstPage::startInstall();
nspInstPage::selectNsp(this->menu->GetSelectedIndex());
} }
} }
if ((Down & KEY_Y)) { if ((Down & KEY_Y)) {