From 952a0dacf6300aec37a50cd6d3ba8719e10b08d6 Mon Sep 17 00:00:00 2001 From: flb Date: Sun, 4 Dec 2022 21:34:00 +0100 Subject: [PATCH] ensure there's enough space for 2.5 the size of a download, don't detect attribution keys as bids --- Makefile | 2 +- source/changelog_page.cpp | 3 +++ source/download.cpp | 4 ++-- source/download_cheats_page.cpp | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1b3b6809..af057227 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ DATA := data INCLUDES := include /lib/borealis/library/include/borealis/extern/nlohmann APP_TITLE := All-in-One Switch Updater APP_AUTHOR := HamletDuFromage -APP_VERSION := 2.21.1 +APP_VERSION := 2.21.2 TARGET := $(notdir $(CURDIR)) ROMFS := resources diff --git a/source/changelog_page.cpp b/source/changelog_page.cpp index aaa660fb..487d1868 100644 --- a/source/changelog_page.cpp +++ b/source/changelog_page.cpp @@ -261,6 +261,9 @@ ChangelogPage::ChangelogPage() : AppletFrame(true, true) verTitles.push_back("v2.21.0"); changes.push_back("\uE016 Dialogs now default to not overwriting .ini files"); + verTitles.push_back("v2.22.0"); + changes.push_back("\uE016 Improved Korean translation.\n\uE016 Be more conversative when checking available space before a download.\n\uE016 Minor fixes."); + for (int i = verTitles.size() - 1; i >= 0; i--) { listItem = new brls::ListItem(verTitles[i]); change = changes[i]; diff --git a/source/download.cpp b/source/download.cpp index a753d07c..4f148e63 100644 --- a/source/download.cpp +++ b/source/download.cpp @@ -126,7 +126,7 @@ namespace download { auto res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &dl); if (!res) { s64 freeStorage; - if (R_SUCCEEDED(fs::getFreeStorageSD(freeStorage)) && dl * 1.1 > freeStorage) { + if (R_SUCCEEDED(fs::getFreeStorageSD(freeStorage)) && dl * 2.5 > freeStorage) { return false; } } @@ -197,7 +197,7 @@ namespace download { s64 freeStorage; s64 fileSize = response[0]["s"]; - if (R_SUCCEEDED(fs::getFreeStorageSD(freeStorage)) && fileSize * 1.1 > freeStorage) + if (R_SUCCEEDED(fs::getFreeStorageSD(freeStorage)) && fileSize * 2.5 > freeStorage) return ""; return response[0]["g"]; diff --git a/source/download_cheats_page.cpp b/source/download_cheats_page.cpp index 83e058b7..f7507578 100644 --- a/source/download_cheats_page.cpp +++ b/source/download_cheats_page.cpp @@ -355,7 +355,8 @@ DownloadCheatsPage_GbaTemp::DownloadCheatsPage_GbaTemp(uint64_t tid, const std:: else { std::string versionsWithCheats; for (auto& [key, val] : cheatsJson.items()) { - versionsWithCheats += key + " "; + if (key != "attribution") + versionsWithCheats += key + " "; } ShowCheatsNotFound(versionsWithCheats); }