From e94a062b8b35a35d180cbb0cc179dd01e0d06c8e Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Sun, 22 Feb 2026 18:01:29 +0000
Subject: [PATCH 1/5] Fix various bugs and perform code cleanup
- Fix #399: Remove manual space tracking (claimSpace/freeSpace) to avoid double-counting.
- Fix #405: Implement ProcUI background handling and clean library shutdown to prevent crashes.
- Fix logic error in getDirsize function.
- Fix various typos (aviable, missmatch, transfair, informations, etc).
- Rename proccessQueue to processQueue.
- Ensure moveDirectory loop stops on error.
- Clean up license headers across the codebase.
- Remove redundant background checks in UI loops.
Co-authored-by: V10lator <1312422+V10lator@users.noreply.github.com>
---
include/cfw.h | 2 +-
include/config.h | 2 +-
include/crypto.h | 2 +-
include/deinstaller.h | 2 +-
include/downloader.h | 2 +-
include/file.h | 2 +-
include/filesystem.h | 4 +-
include/gtitles.h | 2 +-
include/input.h | 2 +-
include/installer.h | 2 +-
include/ioQueue.h | 2 +-
include/keygen.h | 2 +-
include/list.h | 2 +-
include/localisation.h | 2 +-
include/menu/config.h | 2 +-
include/menu/download.h | 2 +-
include/menu/filebrowser.h | 2 +-
include/menu/installer.h | 2 +-
include/menu/insttitlebrowser.h | 2 +-
include/menu/logs.h | 2 +-
include/menu/main.h | 2 +-
include/menu/predownload.h | 2 +-
include/menu/queue.h | 2 +-
include/menu/titlebrowser.h | 2 +-
include/menu/update.h | 2 +-
include/menu/utils.h | 2 +-
include/messages.h | 2 +-
include/no-intro.h | 2 +-
include/notifications.h | 2 +-
include/osdefs.h | 2 +-
include/otp.h | 2 +-
include/queue.h | 4 +-
include/renderer.h | 2 +-
include/romfs.h | 2 +-
include/sanity.h | 2 +-
include/state.h | 2 +-
include/staticMem.h | 2 +-
include/swkbd_wrapper.h | 2 +-
include/thread.h | 2 +-
include/ticket.h | 2 +-
include/titles.h | 2 +-
include/tmd.h | 2 +-
include/updater.h | 2 +-
include/utils.h | 2 +-
include/wut-fixups.h | 2 +-
src/cfw.c | 2 +-
src/config.c | 2 +-
src/crypto.c | 2 +-
src/deinstaller.c | 3 +-
src/downloader.c | 20 +-
src/file.c | 1092 +++++++++++++++----------------
src/filesystem.c | 33 +-
src/input.c | 2 +-
src/installer.c | 3 +-
src/ioQueue.c | 2 +-
src/keygen.c | 2 +-
src/localisation.c | 2 +-
src/main.c | 2 +-
src/menu/configMenu.c | 4 +-
src/menu/downloadMenu.c | 2 +-
src/menu/filebrowserMenu.c | 4 +-
src/menu/installerMenu.c | 4 +-
src/menu/insttitlebrowserMenu.c | 4 +-
src/menu/logsMenu.c | 4 +-
src/menu/mainMenu.c | 7 +-
src/menu/menuUtils.c | 8 +-
src/menu/predownloadMenu.c | 16 +-
src/menu/queueMenu.c | 6 +-
src/menu/titlebrowserMenu.c | 4 +-
src/menu/updateMenu.c | 4 +-
src/no-intro.c | 2 +-
src/notifications.c | 2 +-
src/otp.c | 2 +-
src/queue.c | 4 +-
src/renderer.c | 16 +-
src/sanity.c | 2 +-
src/state.c | 452 +++++++------
src/staticMem.c | 2 +-
src/swkbd_wrapper.cpp | 2 +-
src/thread.c | 2 +-
src/ticket.c | 8 +-
src/titles.c | 2 +-
src/updater.c | 2 +-
src/utils.c | 2 +-
84 files changed, 889 insertions(+), 939 deletions(-)
diff --git a/include/cfw.h b/include/cfw.h
index 1d966fc7..2cdf6755 100644
--- a/include/cfw.h
+++ b/include/cfw.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/config.h b/include/config.h
index 11b33d1a..f0d56d03 100644
--- a/include/config.h
+++ b/include/config.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/crypto.h b/include/crypto.h
index d9997d19..2f703343 100644
--- a/include/crypto.h
+++ b/include/crypto.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/deinstaller.h b/include/deinstaller.h
index 9d127291..1000d80d 100644
--- a/include/deinstaller.h
+++ b/include/deinstaller.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/downloader.h b/include/downloader.h
index 74f3760f..439f26e8 100644
--- a/include/downloader.h
+++ b/include/downloader.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/file.h b/include/file.h
index ca240d9d..7e770d67 100644
--- a/include/file.h
+++ b/include/file.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/filesystem.h b/include/filesystem.h
index 24173b3e..49816bf0 100644
--- a/include/filesystem.h
+++ b/include/filesystem.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
@@ -39,8 +39,6 @@ extern "C"
void deinitFS(bool validCfw) __attribute__((__cold__));
FSAClientHandle getFSAClient() __attribute__((__hot__));
NUSDEV getUSB();
- void claimSpace(NUSDEV dev, uint64_t size);
- void freeSpace(NUSDEV dev, uint64_t size);
uint64_t getFreeSpace(NUSDEV dev);
bool checkFreeSpace(NUSDEV dev, uint64_t size);
uint64_t getSpace(NUSDEV dev);
diff --git a/include/gtitles.h b/include/gtitles.h
index b0324744..041856ad 100644
--- a/include/gtitles.h
+++ b/include/gtitles.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/input.h b/include/input.h
index 93976145..6242614b 100644
--- a/include/input.h
+++ b/include/input.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/installer.h b/include/installer.h
index 88b65e96..bfd9413f 100644
--- a/include/installer.h
+++ b/include/installer.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/ioQueue.h b/include/ioQueue.h
index a1faaddf..6ebddd1a 100644
--- a/include/ioQueue.h
+++ b/include/ioQueue.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/keygen.h b/include/keygen.h
index 0531d3c2..7f6f2fdc 100644
--- a/include/keygen.h
+++ b/include/keygen.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/list.h b/include/list.h
index 1bf32170..35428d91 100644
--- a/include/list.h
+++ b/include/list.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/localisation.h b/include/localisation.h
index 6bbc4d0f..7566bc4c 100644
--- a/include/localisation.h
+++ b/include/localisation.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . * *
+ * with this program; if not, see . * *
***************************************************************************/
#pragma once
diff --git a/include/menu/config.h b/include/menu/config.h
index 9b487c70..37b86c8f 100644
--- a/include/menu/config.h
+++ b/include/menu/config.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/download.h b/include/menu/download.h
index ee7b5f8b..511c2d03 100644
--- a/include/menu/download.h
+++ b/include/menu/download.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/filebrowser.h b/include/menu/filebrowser.h
index 771aa977..3adb757e 100644
--- a/include/menu/filebrowser.h
+++ b/include/menu/filebrowser.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/installer.h b/include/menu/installer.h
index 7de398f3..1e4e2613 100644
--- a/include/menu/installer.h
+++ b/include/menu/installer.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/insttitlebrowser.h b/include/menu/insttitlebrowser.h
index 668ff376..0bfba93c 100644
--- a/include/menu/insttitlebrowser.h
+++ b/include/menu/insttitlebrowser.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/logs.h b/include/menu/logs.h
index 8d32f3df..9c809360 100644
--- a/include/menu/logs.h
+++ b/include/menu/logs.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/main.h b/include/menu/main.h
index e2ca0eaf..61c6f442 100644
--- a/include/menu/main.h
+++ b/include/menu/main.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/predownload.h b/include/menu/predownload.h
index f5ae1949..5a5722f6 100644
--- a/include/menu/predownload.h
+++ b/include/menu/predownload.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/queue.h b/include/menu/queue.h
index 9e8429ca..ee97d8fa 100644
--- a/include/menu/queue.h
+++ b/include/menu/queue.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/titlebrowser.h b/include/menu/titlebrowser.h
index c5178a6c..8b085646 100644
--- a/include/menu/titlebrowser.h
+++ b/include/menu/titlebrowser.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/update.h b/include/menu/update.h
index 706925aa..29e1a75f 100644
--- a/include/menu/update.h
+++ b/include/menu/update.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/menu/utils.h b/include/menu/utils.h
index ab0e16b5..c7dde2d2 100644
--- a/include/menu/utils.h
+++ b/include/menu/utils.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/messages.h b/include/messages.h
index 575b2c5d..a79a411e 100644
--- a/include/messages.h
+++ b/include/messages.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/no-intro.h b/include/no-intro.h
index 189a6f81..db6341f2 100644
--- a/include/no-intro.h
+++ b/include/no-intro.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/notifications.h b/include/notifications.h
index 4096e7d2..aeb99653 100644
--- a/include/notifications.h
+++ b/include/notifications.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/osdefs.h b/include/osdefs.h
index 99c7c75e..562ce06f 100644
--- a/include/osdefs.h
+++ b/include/osdefs.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/otp.h b/include/otp.h
index eebb2f12..b2fa44fb 100644
--- a/include/otp.h
+++ b/include/otp.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/queue.h b/include/queue.h
index 56a64bb5..b27fb6ef 100644
--- a/include/queue.h
+++ b/include/queue.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
@@ -72,7 +72,7 @@ extern "C"
int addToQueue(TitleData *data);
bool removeFromQueue(uint32_t index);
void clearQueue();
- bool proccessQueue();
+ bool processQueue();
LIST *getTitleQueue();
#ifdef __cplusplus
diff --git a/include/renderer.h b/include/renderer.h
index e9a2d8e7..71f898cd 100644
--- a/include/renderer.h
+++ b/include/renderer.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/romfs.h b/include/romfs.h
index 37817b0d..33575374 100644
--- a/include/romfs.h
+++ b/include/romfs.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/sanity.h b/include/sanity.h
index 3c8d9dd3..11098ac5 100644
--- a/include/sanity.h
+++ b/include/sanity.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/state.h b/include/state.h
index ccea4096..5983d4b3 100644
--- a/include/state.h
+++ b/include/state.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/staticMem.h b/include/staticMem.h
index 45af8f4b..d4670e3d 100644
--- a/include/staticMem.h
+++ b/include/staticMem.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/swkbd_wrapper.h b/include/swkbd_wrapper.h
index 1a6e2c19..28530967 100644
--- a/include/swkbd_wrapper.h
+++ b/include/swkbd_wrapper.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/thread.h b/include/thread.h
index ae2ec97c..74ad2d8d 100644
--- a/include/thread.h
+++ b/include/thread.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/ticket.h b/include/ticket.h
index 0c5a314a..49e68f07 100644
--- a/include/ticket.h
+++ b/include/ticket.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/titles.h b/include/titles.h
index 315df8e7..7bab5332 100644
--- a/include/titles.h
+++ b/include/titles.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/tmd.h b/include/tmd.h
index a5fa3187..439a5d82 100644
--- a/include/tmd.h
+++ b/include/tmd.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/updater.h b/include/updater.h
index 66874ceb..0320cf28 100644
--- a/include/updater.h
+++ b/include/updater.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/utils.h b/include/utils.h
index a3a3b8c6..cb74e614 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#pragma once
diff --git a/include/wut-fixups.h b/include/wut-fixups.h
index 5c519c2c..569da8eb 100644
--- a/include/wut-fixups.h
+++ b/include/wut-fixups.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
// This is to fix some WUT bugs.
diff --git a/src/cfw.c b/src/cfw.c
index c222baa4..9d801e51 100644
--- a/src/cfw.c
+++ b/src/cfw.c
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#include
diff --git a/src/config.c b/src/config.c
index 6aa2689d..264a978b 100644
--- a/src/config.c
+++ b/src/config.c
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#include
diff --git a/src/crypto.c b/src/crypto.c
index eb8ddd22..038115eb 100755
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#include
diff --git a/src/deinstaller.c b/src/deinstaller.c
index 90f1aa01..45ac0c8a 100644
--- a/src/deinstaller.c
+++ b/src/deinstaller.c
@@ -13,7 +13,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#include
@@ -80,7 +80,6 @@ bool deinstall(MCPTitleListType *title, const char *name, bool channelHaxx, bool
t = OSGetTick() - t;
addEntropy(&t, sizeof(OSTick));
- freeSpace(getDevFromPath(title->path), titleSize);
addToScreenLog("Deinstallation finished!");
if(!skipEnd)
diff --git a/src/downloader.c b/src/downloader.c
index 1ca6b836..ebbf1dae 100644
--- a/src/downloader.c
+++ b/src/downloader.c
@@ -14,7 +14,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
+ * with this program; if not, see . *
***************************************************************************/
#include
@@ -217,9 +217,7 @@ static bool showNetworkError(const char *err)
bool ret = false;
while(AppRunning(true))
{
- if(app == APP_STATE_BACKGROUND)
- continue;
- else if(app == APP_STATE_RETURNING)
+ if(app == APP_STATE_RETURNING)
drawErrorFrame(toScreen, B_RETURN | Y_RETRY);
if(autoResumeEnabled())
@@ -545,8 +543,8 @@ static void drawStatLine(int line, curl_off_t totalSize, curl_off_t currentSize,
int downloadFile(const char *url, char *file, downloadData *data, FileType type, bool resume, QUEUE_DATA *queueData, RAMBUF *rambuf)
{
- // Results: 0 = OK | 1 = Error | 2 = No ticket aviable | 3 = Exit
- // Types: 0 = .app | 1 = .h3 | 2 = title.tmd | 3 = tilte.tik
+ // Results: 0 = OK | 1 = Error | 2 = No ticket available | 3 = Exit
+ // Types: 0 = .app | 1 = .h3 | 2 = title.tmd | 3 = title.tik
debugPrintf("Download URL: %s", url);
debugPrintf("Download PATH: %s", rambuf ? "" : file);
@@ -673,7 +671,7 @@ int downloadFile(const char *url, char *file, downloadData *data, FileType type,
return 1;
OSTick ts;
- OSTick lastTransfair = OSGetTick();
+ OSTick lastTransfer = OSGetTick();
size_t dltotal; // We use size_t instead of curl_off_t as filesizes are limitted to 4 GB anyway,
size_t dlnow;
size_t downloaded = 0;
@@ -706,7 +704,7 @@ int downloadFile(const char *url, char *file, downloadData *data, FileType type,
{
if(dltotal)
{
- tmp = OSTicksToMilliseconds(ts - lastTransfair); // sample duration in milliseconds
+ tmp = OSTicksToMilliseconds(ts - lastTransfer); // sample duration in milliseconds
if(tmp)
{
bps *= 1000.0f; // secs to ms.
@@ -725,7 +723,7 @@ int downloadFile(const char *url, char *file, downloadData *data, FileType type,
bps = 0.0f;
}
- lastTransfair = ts;
+ lastTransfer = ts;
startNewFrame();
if(data != NULL)
@@ -915,8 +913,6 @@ int downloadFile(const char *url, char *file, downloadData *data, FileType type,
while(AppRunning(true))
{
- if(app == APP_STATE_BACKGROUND)
- continue;
if(app == APP_STATE_RETURNING)
drawErrorFrame(toScreen, B_RETURN | Y_RETRY);
@@ -954,8 +950,6 @@ int downloadFile(const char *url, char *file, downloadData *data, FileType type,
while(AppRunning(true))
{
- if(app == APP_STATE_BACKGROUND)
- continue;
if(app == APP_STATE_RETURNING)
drawErrorFrame(toScreen, B_RETURN | Y_RETRY);
diff --git a/src/file.c b/src/file.c
index 6d547712..69612436 100644
--- a/src/file.c
+++ b/src/file.c
@@ -1,546 +1,546 @@
-/***************************************************************************
- * This file is part of NUSspli. *
- * Copyright (c) 2019-2020 Pokes303 *
- * Copyright (c) 2020-2022 V10lator *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 3 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, If not, see . *
- ***************************************************************************/
-
-#include
-
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include