1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-09 12:01:44 +00:00

do not show theme warning when downloading something that is not firmware files.

This commit is contained in:
flb 2021-08-03 16:27:06 +02:00
parent 46d1c7de6c
commit 6f6b8ad274
4 changed files with 14 additions and 13 deletions

View file

@ -22,7 +22,7 @@ DATA := data
INCLUDES := include lib/zipper/include /lib/borealis/library/include/borealis/extern/nlohmann
APP_TITLE := All-in-One Switch Updater
APP_AUTHOR := HamletDuFromage
APP_VERSION := 2.11.4
APP_VERSION := 2.11.5
TARGET := $(notdir $(CURDIR))
ROMFS := resources

View file

@ -193,6 +193,9 @@ ChangelogPage::ChangelogPage() : AppletFrame(true, true)
verTitles.push_back("v2.11.4");
changes.push_back("\uE016 Fix Traditional Chinese strings not showing.\n\uE016 Remove full RAM access check for firmware downloads.");
verTitles.push_back("v2.11.5");
changes.push_back("\uE016 Update Japanese translation.\n\uE016 Do not show theme warning when downloading something that is not firmware files.");
for(int i = verTitles.size() -1 ; i >= 0; i--){
listItem = new brls::ListItem(verTitles[i]);
change = changes[i];

View file

@ -27,7 +27,6 @@ ListDownloadTab::ListDownloadTab(const archiveType type) :
this->description = new brls::Label(brls::LabelStyle::DESCRIPTION, "", true);
switch(type){
case archiveType::ams_cfw:
case archiveType::sigpatches:
links = download::getLinks(SIGPATCHES_URL);
operation += "menus/main/sigpatches"_i18n;
@ -76,6 +75,8 @@ ListDownloadTab::ListDownloadTab(const archiveType type) :
currentCheatsVer = util::readVersion(CHEATS_VERSION);
this->description->setText("menus/main/cheats_text"_i18n + currentCheatsVer);
break;
default:
break;
}
this->addView(description);
@ -102,14 +103,9 @@ ListDownloadTab::ListDownloadTab(const archiveType type) :
new WorkerPage(stagedFrame, "menus/common/extracting"_i18n, [type](){util::extractArchive(type);})
);
std::string doneMsg = "menus/common/all_done"_i18n;
std::string contentsPath;
switch(type){
case archiveType::ams_cfw:
case archiveType::app:
case archiveType::cfw:
case archiveType::cheats:
case archiveType::fw:
contentsPath = util::getContentsPath();
case archiveType::fw: {
std::string contentsPath = util::getContentsPath();
for (const auto& tid : {"0100000000001000", "0100000000001007", "0100000000001013"}) {
if(std::filesystem::exists(contentsPath + tid) && !std::filesystem::is_empty(contentsPath + tid)) {
doneMsg += "\n" + "menus/main/theme_warning"_i18n;
@ -117,9 +113,12 @@ ListDownloadTab::ListDownloadTab(const archiveType type) :
}
}
break;
}
case archiveType::sigpatches:
doneMsg += "\n" + "menus/sigpatches/reboot"_i18n;
break;
default:
break;
}
stagedFrame->addStage(
new ConfirmPage(stagedFrame, doneMsg, true)

View file

@ -99,8 +99,6 @@ int showDialogBox(const std::string& text, const std::string& opt1, const std::s
void extractArchive(archiveType type, const std::string& tag){
int overwriteInis = 0;
std::vector<std::string> titles;
std::string nroPath ="sdmc:" + std::string(APP_PATH);
chdir(ROOT_PATH);
switch(type){
case archiveType::sigpatches:
@ -122,11 +120,12 @@ void extractArchive(archiveType type, const std::string& tag){
brls::Application::crash("menus/utils/wrong_type_sigpatches"_i18n);
}
break;
case archiveType::cheats:
titles = extract::getInstalledTitlesNs();
case archiveType::cheats: {
std::vector<std::string> titles = extract::getInstalledTitlesNs();
titles = extract::excludeTitles(CHEATS_EXCLUDE, titles);
extract::extractCheats(CHEATS_FILENAME, titles, CurrentCfw::running_cfw);
break;
}
case archiveType::fw:
if(std::filesystem::file_size(FIRMWARE_FILENAME) < 200000){
brls::Application::crash("menus/utils/wrong_type_sigpatches_downloaded"_i18n);