1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-28 12:22:02 +00:00

ensure there's enough space for 2.5 the size of a download, don't detect attribution keys as bids

This commit is contained in:
flb 2022-12-04 21:34:00 +01:00
parent 6ba1dd734e
commit 952a0dacf6
4 changed files with 8 additions and 4 deletions

View file

@ -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

View file

@ -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];

View file

@ -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"];

View file

@ -355,6 +355,7 @@ DownloadCheatsPage_GbaTemp::DownloadCheatsPage_GbaTemp(uint64_t tid, const std::
else {
std::string versionsWithCheats;
for (auto& [key, val] : cheatsJson.items()) {
if (key != "attribution")
versionsWithCheats += key + " ";
}
ShowCheatsNotFound(versionsWithCheats);