Misc usb fixes

This commit is contained in:
Huntereb 2019-11-30 12:21:01 -05:00
parent e4d530c296
commit 287bd72893
3 changed files with 7 additions and 7 deletions

View file

@ -30,7 +30,7 @@ namespace inst::ui {
this->netInstallMenuItem = pu::ui::elm::MenuItem::New("Install over LAN or internet");
this->netInstallMenuItem->SetColor(COLOR("#FFFFFFFF"));
this->netInstallMenuItem->SetIcon("romfs:/cloud-download.png");
this->usbInstallMenuItem = pu::ui::elm::MenuItem::New("Install Over USB");
this->usbInstallMenuItem = pu::ui::elm::MenuItem::New("Install over USB");
this->usbInstallMenuItem->SetColor(COLOR("#FFFFFFFF"));
this->usbInstallMenuItem->SetIcon("romfs:/usb-port.png");
this->sigPatchesMenuItem = pu::ui::elm::MenuItem::New("Manage signature patches");

View file

@ -88,7 +88,7 @@ namespace inst::ui {
void usbInstPage::startInstall() {
int dialogResult = -1;
if (this->selectedTitles.size() == 1) dialogResult = mainApp->CreateShowDialog("Where should " + selectedTitles[0] + " be installed to?", "Press B to cancel", {"SD Card", "Internal Storage"}, false);
if (this->selectedTitles.size() == 1) dialogResult = mainApp->CreateShowDialog("Where should " + inst::util::shortenString(inst::util::formatUrlString(this->selectedTitles[0]), 32, true) + " be installed to?", "Press B to cancel", {"SD Card", "Internal Storage"}, false);
else dialogResult = mainApp->CreateShowDialog("Where should the selected " + std::to_string(this->selectedTitles.size()) + " files be installed to?", "Press B to cancel", {"SD Card", "Internal Storage"}, false);
if (dialogResult == -1) return;
usbInstStuff::installTitleUsb(this->selectedTitles, dialogResult);

View file

@ -73,16 +73,16 @@ namespace usbInstStuff {
std::vector<std::string> fileNames;
for (long unsigned int i = 0; i < ourTitleList.size(); i++) {
fileNames.push_back(inst::util::shortenString(ourTitleList[i], 40, true));
fileNames.push_back(inst::util::shortenString(inst::util::formatUrlString(ourTitleList[i]), 40, true));
}
/*
std::vector<int> previousClockValues;
if (inst::config::overClock) {
previousClockValues.push_back(inst::util::setClockSpeed(0, 1785000000)[0]);
previousClockValues.push_back(inst::util::setClockSpeed(1, 76800000)[0]);
previousClockValues.push_back(inst::util::setClockSpeed(2, 1600000000)[0]);
}
*/
try {
for (fileItr = 0; fileItr < ourTitleList.size(); fileItr++) {
inst::ui::setTopInstInfoText("Installing " + fileNames[fileItr] + " over USB");
@ -116,13 +116,13 @@ namespace usbInstStuff {
}
tin::util::USBCmdManager::SendExitCmd();
/*
if (previousClockValues.size() > 0) {
inst::util::setClockSpeed(0, previousClockValues[0]);
inst::util::setClockSpeed(1, previousClockValues[1]);
inst::util::setClockSpeed(2, previousClockValues[2]);
}
*/
if(nspInstalled) {
inst::ui::setInstInfoText("Install complete");