diff --git a/include/constants.hpp b/include/constants.hpp index 95eb1cf..e085382 100644 --- a/include/constants.hpp +++ b/include/constants.hpp @@ -118,9 +118,10 @@ enum class contentType ams_cfw, payloads, hekate_ipl, + megafw, }; -constexpr std::string_view contentTypeNames[8]{"sigpatches", "cheats", "firmwares", "app", "bootloaders", "cfws", "payloads", "hekate_ipl"}; +constexpr std::string_view contentTypeNames[9]{"sigpatches", "cheats", "firmwares", "app", "bootloaders", "cfws", "payloads", "hekate_ipl", "firmwares_mega"}; enum class CFW { diff --git a/source/list_download_tab.cpp b/source/list_download_tab.cpp index fd6c293..aaff5af 100644 --- a/source/list_download_tab.cpp +++ b/source/list_download_tab.cpp @@ -87,6 +87,7 @@ void ListDownloadTab::createList(contentType type) std::string doneMsg = "menus/common/all_done"_i18n; switch (type) { + case contentType::megafw: case contentType::fw: { std::string contentsPath = util::getContentsPath(); for (const auto& tid : {"0100000000001000", "0100000000001007", "0100000000001013"}) { @@ -144,6 +145,7 @@ void ListDownloadTab::setDescription(contentType type) case contentType::sigpatches: description->setText("menus/main/sigpatches_text"_i18n); break; + case contentType::megafw: case contentType::fw: { SetSysFirmwareVersion ver; description->setText(fmt::format("{}{}", "menus/main/firmware_text"_i18n, R_SUCCEEDED(setsysGetFirmwareVersion(&ver)) ? ver.display_version : "menus/main/not_found"_i18n)); diff --git a/source/main_frame.cpp b/source/main_frame.cpp index de26e9c..5131d95 100644 --- a/source/main_frame.cpp +++ b/source/main_frame.cpp @@ -50,7 +50,7 @@ MainFrame::MainFrame() : TabFrame() this->addTab("menus/main/update_sigpatches"_i18n, new ListDownloadTab(contentType::sigpatches, nxlinks)); if (!util::getBoolValue(hideStatus, "firmwares")) - this->addTab("menus/main/download_firmware"_i18n, new ListDownloadTab(contentType::fw, nxlinks)); + this->addTab("menus/main/download_firmware"_i18n, new ListDownloadTab(contentType::megafw, nxlinks)); if (!util::getBoolValue(hideStatus, "cheats")) this->addTab("menus/main/download_cheats"_i18n, new ListDownloadTab(contentType::cheats)); diff --git a/source/utils.cpp b/source/utils.cpp index 1caa357..9ebad24 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -49,6 +49,7 @@ namespace util { case contentType::cheats: status_code = download::downloadFile(url, CHEATS_FILENAME, OFF); break; + case contentType::megafw: case contentType::fw: status_code = download::downloadFile(url, FIRMWARE_FILENAME, OFF); break; @@ -132,6 +133,7 @@ namespace util { case contentType::cheats: filename = CHEATS_FILENAME; break; + case contentType::megafw: case contentType::fw: filename = FIRMWARE_FILENAME; break; @@ -166,6 +168,7 @@ namespace util { extract::extractCheats(CHEATS_FILENAME, titles, CurrentCfw::running_cfw, version); break; } + case contentType::megafw: case contentType::fw: if (std::filesystem::exists(FIRMWARE_PATH)) std::filesystem::remove_all(FIRMWARE_PATH); fs::createTree(FIRMWARE_PATH);