From 7827456236797a53f50d3232393d3b408969b990 Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Sun, 4 Aug 2024 16:48:02 +0200 Subject: [PATCH 1/9] fix emptyFolder check --- src/savemng.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/savemng.cpp b/src/savemng.cpp index 84090e0..39dd4fa 100644 --- a/src/savemng.cpp +++ b/src/savemng.cpp @@ -10,6 +10,7 @@ #include #include + #define __FSAShimSend ((FSError(*)(FSAShimBuffer *, uint32_t))(0x101C400 + 0x042d90)) #define IO_MAX_FILE_BUFFER (1024 * 1024) // 1 MB @@ -202,14 +203,18 @@ static bool folderEmpty(const char *fPath) { if (dir == nullptr) return false; - int c = 0; + bool empty = true; struct dirent *data; - while ((data = readdir(dir)) != nullptr) - if (++c > 2) - break; + while ((data = readdir(dir)) != nullptr) { + // rewritten to work wether ./.. are returned or not + if(strcmp(data->d_name,".") == 0 || strcmp(data->d_name,"..") == 0) + continue; + empty = false; + break; + } closedir(dir); - return c < 3; + return empty; } static bool createFolder(const char *path) { From 4c9b69087fd0a41de7d23fdba6cf602567eec4e8 Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Sun, 4 Aug 2024 16:54:42 +0200 Subject: [PATCH 2/9] refactor ProcUI + Colors --- include/savemng.h | 5 ----- include/utils/Colors.h | 6 ++++++ include/utils/DrawUtils.h | 4 ++-- include/utils/StateUtils.h | 2 ++ src/main.cpp | 3 +++ src/menu/WiiUTitleListState.cpp | 1 + src/menu/vWiiTitleListState.cpp | 1 + src/savemng.cpp | 1 + src/utils/DrawUtils.cpp | 22 +++++++++++++--------- src/utils/StateUtils.cpp | 20 ++++++++++++++++++-- 10 files changed, 47 insertions(+), 18 deletions(-) create mode 100644 include/utils/Colors.h diff --git a/include/savemng.h b/include/savemng.h index ccc47a3..9152106 100644 --- a/include/savemng.h +++ b/include/savemng.h @@ -23,11 +23,6 @@ #define M_OFF 1 #define Y_OFF 1 -#define COLOR_WHITE Color(0xffffffff) -#define COLOR_BLACK Color(0, 0, 0, 255) -#define COLOR_BACKGROUND Color(0x00006F00) -#define COLOR_TEXT COLOR_WHITE - struct Title { uint32_t highID; uint32_t lowID; diff --git a/include/utils/Colors.h b/include/utils/Colors.h new file mode 100644 index 0000000..3e24658 --- /dev/null +++ b/include/utils/Colors.h @@ -0,0 +1,6 @@ +#pragma once + +#define COLOR_WHITE Color(0xffffffff) +#define COLOR_BLACK Color(0, 0, 0, 255) +#define COLOR_BACKGROUND Color(0x00006F00) +#define COLOR_TEXT COLOR_WHITE \ No newline at end of file diff --git a/include/utils/DrawUtils.h b/include/utils/DrawUtils.h index 44e829b..10a5bf3 100644 --- a/include/utils/DrawUtils.h +++ b/include/utils/DrawUtils.h @@ -77,9 +77,9 @@ class DrawUtils { static void drawRGB5A3(int x, int y, float scale, uint8_t *fileContent); - static uint32_t ConsoleProcCallbackAcquired(void *context); + static uint32_t initScreen(); - static uint32_t ConsoleProcCallbackReleased(void *context); + static uint32_t deinitScreen(); diff --git a/include/utils/StateUtils.h b/include/utils/StateUtils.h index a469b9e..9891335 100644 --- a/include/utils/StateUtils.h +++ b/include/utils/StateUtils.h @@ -6,6 +6,8 @@ class State { static bool AppRunning(); static void shutdown(); static void registerProcUICallbacks(); + static uint32_t ConsoleProcCallbackAcquired(void *context); + static uint32_t ConsoleProcCallbackReleased(void *context); private: static bool aroma; diff --git a/src/main.cpp b/src/main.cpp index b13c3cf..c2cd2ba 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -394,6 +395,8 @@ int main() { OSFatal("Failed to initialize OSSCreen"); } + State::registerProcUICallbacks(); + if (!DrawUtils::initFont()) { OSFatal("Failed to init font"); } diff --git a/src/menu/WiiUTitleListState.cpp b/src/menu/WiiUTitleListState.cpp index f9d8309..d25e93f 100644 --- a/src/menu/WiiUTitleListState.cpp +++ b/src/menu/WiiUTitleListState.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #define MAX_TITLE_SHOW 14 static int cursorPos = 0; diff --git a/src/menu/vWiiTitleListState.cpp b/src/menu/vWiiTitleListState.cpp index 8aa4b8b..0f336ee 100644 --- a/src/menu/vWiiTitleListState.cpp +++ b/src/menu/vWiiTitleListState.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #define MAX_TITLE_SHOW 14 static int cursorPos = 0; diff --git a/src/savemng.cpp b/src/savemng.cpp index 39dd4fa..f7bd7bc 100644 --- a/src/savemng.cpp +++ b/src/savemng.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include diff --git a/src/utils/DrawUtils.cpp b/src/utils/DrawUtils.cpp index 2cda6b1..16cdfd2 100644 --- a/src/utils/DrawUtils.cpp +++ b/src/utils/DrawUtils.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include @@ -33,14 +33,13 @@ uint32_t DrawUtils::sBufferSizeDRC = 0; static SFT pFont = {}; static Color font_col(0xFFFFFFFF); -static Color black(0x000000FF); void *DrawUtils::sBufferTV = NULL, *DrawUtils::sBufferDRC = NULL; uint32_t DrawUtils::sBufferSizeTV = 0, DrawUtils::sBufferSizeDRC = 0; BOOL DrawUtils::sConsoleHasForeground = TRUE; uint32_t -DrawUtils::ConsoleProcCallbackAcquired(void *context) +DrawUtils::initScreen() { MEMHeapHandle heap = MEMGetBaseHeapHandle(MEM_BASE_HEAP_MEM1); MEMRecordStateForFrmHeap(heap, CONSOLE_FRAME_HEAP_TAG); @@ -66,7 +65,7 @@ DrawUtils::ConsoleProcCallbackAcquired(void *context) for (int i = 0; i<2; i++) // both buffers to black { - DrawUtils::clear(black); + DrawUtils::clear(COLOR_BLACK); DrawUtils::endDraw(); } @@ -76,8 +75,15 @@ DrawUtils::ConsoleProcCallbackAcquired(void *context) } uint32_t -DrawUtils::ConsoleProcCallbackReleased(void *context) +DrawUtils::deinitScreen() { + + for (int i = 0; i<2; i++) // both buffers to black + { + DrawUtils::clear(COLOR_BLACK); + DrawUtils::endDraw(); + } + MEMHeapHandle heap = MEMGetBaseHeapHandle(MEM_BASE_HEAP_MEM1); MEMFreeByStateToFrmHeap(heap, CONSOLE_FRAME_HEAP_TAG); sConsoleHasForeground = FALSE; @@ -92,10 +98,8 @@ DrawUtils::LogConsoleInit() sBufferSizeTV = OSScreenGetBufferSizeEx(SCREEN_TV); sBufferSizeDRC = OSScreenGetBufferSizeEx(SCREEN_DRC); - ConsoleProcCallbackAcquired(NULL); + initScreen(); - State::registerProcUICallbacks(); - return FALSE; } @@ -103,8 +107,8 @@ void DrawUtils::LogConsoleFree() { if (sConsoleHasForeground) { + deinitScreen(); OSScreenShutdown(); - ConsoleProcCallbackReleased(NULL); } } diff --git a/src/utils/StateUtils.cpp b/src/utils/StateUtils.cpp index 6cd1164..738e17e 100644 --- a/src/utils/StateUtils.cpp +++ b/src/utils/StateUtils.cpp @@ -11,6 +11,9 @@ #include +#include +#include + bool State::aroma = false; void State::init() { @@ -25,10 +28,22 @@ void State::init() { } +uint32_t +State::ConsoleProcCallbackAcquired(void *context) +{ + return DrawUtils::initScreen(); +} + +uint32_t +State::ConsoleProcCallbackReleased(void *context) +{ + return DrawUtils::deinitScreen(); +} + void State::registerProcUICallbacks() { if (aroma) { - ProcUIRegisterCallback(PROCUI_CALLBACK_ACQUIRE, DrawUtils::ConsoleProcCallbackAcquired, NULL, 100); - ProcUIRegisterCallback(PROCUI_CALLBACK_RELEASE, DrawUtils::ConsoleProcCallbackReleased, NULL, 100); + ProcUIRegisterCallback(PROCUI_CALLBACK_ACQUIRE, ConsoleProcCallbackAcquired, NULL, 100); + ProcUIRegisterCallback(PROCUI_CALLBACK_RELEASE, ConsoleProcCallbackReleased, NULL, 100); } } @@ -43,6 +58,7 @@ bool State::AppRunning() { break; case PROCUI_STATUS_RELEASE_FOREGROUND: // Free up MEM1 to next foreground app, deinit screen, etc. + WHBLogPrintf("ToProcUIDoneRelease"); ProcUIDrawDoneRelease(); break; case PROCUI_STATUS_IN_FOREGROUND: From f22a1fa801238d99109f182d01df2c4fdd9185ae Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:45:38 +0200 Subject: [PATCH 3/9] restore only creates needed folders/quota --- src/savemng.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/savemng.cpp b/src/savemng.cpp index f7bd7bc..3cc2970 100644 --- a/src/savemng.cpp +++ b/src/savemng.cpp @@ -1012,19 +1012,24 @@ void restoreSavedata(Title *title, uint8_t slot, int8_t sdusers, int8_t allusers srcPath = getBackupPath(highID, lowID, slot); std::string dstPath = StringUtils::stringFormat("%s/%08x/%08x/%s", path.c_str(), highID, lowID, isWii ? "data" : "user"); createFolderUnlocked(dstPath); - FSAMakeQuotaFromDir(srcPath.c_str(), dstPath.c_str(), title->accountSaveSize); - + if ((sdusers > -1) && !isWii) { if (common) { + FSAMakeQuota(handle, newlibtoFSA(dstPath + "/common").c_str(), 0x666, title->accountSaveSize); if (!copyDir(srcPath + "/common", dstPath + "/common")) promptError(LanguageUtils::gettext("Common save not found.")); } srcPath.append(StringUtils::stringFormat("/%s", sdacc[sdusers].persistentID)); dstPath.append(StringUtils::stringFormat("/%s", wiiuacc[allusers].persistentID)); + FSAMakeQuota(handle, newlibtoFSA(dstPath).c_str(), 0x666, title->accountSaveSize); + } else { + FSAMakeQuotaFromDir(srcPath.c_str(), dstPath.c_str(), title->accountSaveSize); } if (!copyDir(srcPath, dstPath)) promptError(LanguageUtils::gettext("Restore failed.")); + + if (!title->saveInit && !isWii) { std::string userPath = StringUtils::stringFormat("%s/%08x/%08x/user", path.c_str(), highID, lowID); From 6278f36e8d074538249e33f96608a605545673d9 Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Mon, 5 Aug 2024 22:58:21 +0200 Subject: [PATCH 4/9] fix copySavedata - allusers and quota --- src/savemng.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/savemng.cpp b/src/savemng.cpp index 3cc2970..e7bafc7 100644 --- a/src/savemng.cpp +++ b/src/savemng.cpp @@ -857,16 +857,23 @@ void copySavedata(Title *title, Title *titleb, int8_t allusers, int8_t allusers_ std::string srcPath = StringUtils::stringFormat("%s/%08x/%08x/%s", path.c_str(), highID, lowID, "user"); std::string dstPath = StringUtils::stringFormat("%s/%08x/%08x/%s", pathb.c_str(), highIDb, lowIDb, "user"); createFolderUnlocked(dstPath); - FSAMakeQuotaFromDir(srcPath.c_str(), dstPath.c_str(), titleb->accountSaveSize); - if (allusers > -1) - if (common) + if (allusers > -1) { + if (common) { + FSAMakeQuota(handle, newlibtoFSA(dstPath + "/common").c_str(), 0x666, titleb->accountSaveSize); if (!copyDir(srcPath + "/common", dstPath + "/common")) promptError(LanguageUtils::gettext("Common save not found.")); + } + srcPath.append(StringUtils::stringFormat("/%s", wiiuacc[allusers].persistentID)); + dstPath.append(StringUtils::stringFormat("/%s", wiiuacc[allusers_d].persistentID)); + FSAMakeQuota(handle, newlibtoFSA(dstPath).c_str(), 0x666, titleb->accountSaveSize); + } else { + FSAMakeQuotaFromDir(srcPath.c_str(), dstPath.c_str(), titleb->accountSaveSize); + } - if (!copyDir(srcPath + StringUtils::stringFormat("/%s", wiiuacc[allusers].persistentID), - dstPath + StringUtils::stringFormat("/%s", wiiuacc[allusers_d].persistentID))) + if (!copyDir(srcPath, dstPath)) promptError(LanguageUtils::gettext("Copy failed.")); + if (!titleb->saveInit) { std::string userPath = StringUtils::stringFormat("%s/%08x/%08x/user", pathb.c_str(), highIDb, lowIDb); From dc430897c0f86bee0f940622f29b6a755ef5eaef Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Tue, 6 Aug 2024 00:14:41 +0200 Subject: [PATCH 5/9] bump version to 1.6.2 --- include/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/version.h b/include/version.h index d98fc50..c784e46 100644 --- a/include/version.h +++ b/include/version.h @@ -2,4 +2,4 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 6 -#define VERSION_MICRO 1 +#define VERSION_MICRO 2 From d6dd6b3ab98df43a6148de31ddcf74b6ef059d74 Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:36:10 +0200 Subject: [PATCH 6/9] remove WHBLOG in utils/State.h --- src/utils/DrawUtils.cpp | 5 ++--- src/utils/StateUtils.cpp | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/utils/DrawUtils.cpp b/src/utils/DrawUtils.cpp index 16cdfd2..65f3d03 100644 --- a/src/utils/DrawUtils.cpp +++ b/src/utils/DrawUtils.cpp @@ -59,9 +59,8 @@ DrawUtils::initScreen() OSScreenSetBufferEx(SCREEN_DRC, sBufferDRC); DrawUtils::initBuffers(sBufferTV, sBufferDRC); - OSScreenEnableEx(SCREEN_TV, 1); + OSScreenEnableEx(SCREEN_TV, 1); OSScreenEnableEx(SCREEN_DRC, 1); - for (int i = 0; i<2; i++) // both buffers to black { @@ -99,7 +98,7 @@ DrawUtils::LogConsoleInit() sBufferSizeDRC = OSScreenGetBufferSizeEx(SCREEN_DRC); initScreen(); - + return FALSE; } diff --git a/src/utils/StateUtils.cpp b/src/utils/StateUtils.cpp index 738e17e..95048cc 100644 --- a/src/utils/StateUtils.cpp +++ b/src/utils/StateUtils.cpp @@ -11,8 +11,6 @@ #include -#include -#include bool State::aroma = false; @@ -58,7 +56,6 @@ bool State::AppRunning() { break; case PROCUI_STATUS_RELEASE_FOREGROUND: // Free up MEM1 to next foreground app, deinit screen, etc. - WHBLogPrintf("ToProcUIDoneRelease"); ProcUIDrawDoneRelease(); break; case PROCUI_STATUS_IN_FOREGROUND: From 911f3816305a6d59951aa658a85f5efefb7d7b75 Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Tue, 6 Aug 2024 19:05:04 +0200 Subject: [PATCH 7/9] reduce calls to OSScreenEnableEx, move it to initScreen --- src/utils/DrawUtils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/DrawUtils.cpp b/src/utils/DrawUtils.cpp index 65f3d03..9c8085f 100644 --- a/src/utils/DrawUtils.cpp +++ b/src/utils/DrawUtils.cpp @@ -59,9 +59,6 @@ DrawUtils::initScreen() OSScreenSetBufferEx(SCREEN_DRC, sBufferDRC); DrawUtils::initBuffers(sBufferTV, sBufferDRC); - OSScreenEnableEx(SCREEN_TV, 1); - OSScreenEnableEx(SCREEN_DRC, 1); - for (int i = 0; i<2; i++) // both buffers to black { DrawUtils::clear(COLOR_BLACK); @@ -99,6 +96,9 @@ DrawUtils::LogConsoleInit() initScreen(); + OSScreenEnableEx(SCREEN_TV, 1); + OSScreenEnableEx(SCREEN_DRC, 1); + return FALSE; } From 484ea7f246f11ab97c224b070e175c2cbe2a4060 Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:52:19 +0200 Subject: [PATCH 8/9] eliminate temp buffer variables/simplify initscreen calls --- include/utils/DrawUtils.h | 3 --- src/utils/DrawUtils.cpp | 46 +++++++++------------------------------ 2 files changed, 10 insertions(+), 39 deletions(-) diff --git a/include/utils/DrawUtils.h b/include/utils/DrawUtils.h index 10a5bf3..725eb76 100644 --- a/include/utils/DrawUtils.h +++ b/include/utils/DrawUtils.h @@ -39,8 +39,6 @@ class DrawUtils { static void LogConsoleFree(); - static void initBuffers(void *tvBuffer, void *drcBuffer); - static void beginDraw(); static void endDraw(); @@ -92,7 +90,6 @@ class DrawUtils { static uint8_t *tvBuffer; static uint8_t *drcBuffer; - static void *sBufferTV, *sBufferDRC; static uint32_t sBufferSizeTV, sBufferSizeDRC; static BOOL sConsoleHasForeground; }; diff --git a/src/utils/DrawUtils.cpp b/src/utils/DrawUtils.cpp index 9c8085f..078b3c9 100644 --- a/src/utils/DrawUtils.cpp +++ b/src/utils/DrawUtils.cpp @@ -26,18 +26,13 @@ bool DrawUtils::isBackBuffer; uint8_t *DrawUtils::tvBuffer = nullptr; uint8_t *DrawUtils::drcBuffer = nullptr; -/* -uint32_t DrawUtils::sBufferSizeTV = 0; -uint32_t DrawUtils::sBufferSizeDRC = 0; -*/ +uint32_t DrawUtils::sBufferSizeTV = 0, DrawUtils::sBufferSizeDRC = 0; +BOOL DrawUtils::sConsoleHasForeground = TRUE; + static SFT pFont = {}; static Color font_col(0xFFFFFFFF); -void *DrawUtils::sBufferTV = NULL, *DrawUtils::sBufferDRC = NULL; -uint32_t DrawUtils::sBufferSizeTV = 0, DrawUtils::sBufferSizeDRC = 0; -BOOL DrawUtils::sConsoleHasForeground = TRUE; - uint32_t DrawUtils::initScreen() { @@ -45,45 +40,36 @@ DrawUtils::initScreen() MEMRecordStateForFrmHeap(heap, CONSOLE_FRAME_HEAP_TAG); if (sBufferSizeTV) { - sBufferTV = MEMAllocFromFrmHeapEx(heap, sBufferSizeTV, 4); + DrawUtils::tvBuffer = static_cast(MEMAllocFromFrmHeapEx(heap, sBufferSizeTV, 4)); } if (sBufferSizeDRC) { - sBufferDRC = MEMAllocFromFrmHeapEx(heap, sBufferSizeDRC, 4); + DrawUtils::drcBuffer = static_cast(MEMAllocFromFrmHeapEx(heap, sBufferSizeDRC, 4)); } sConsoleHasForeground = TRUE; - OSScreenSetBufferEx(SCREEN_TV, sBufferTV); - OSScreenSetBufferEx(SCREEN_DRC, sBufferDRC); - DrawUtils::initBuffers(sBufferTV, sBufferDRC); + OSScreenSetBufferEx(SCREEN_TV, DrawUtils::tvBuffer); + OSScreenSetBufferEx(SCREEN_DRC, DrawUtils::drcBuffer); - for (int i = 0; i<2; i++) // both buffers to black - { - DrawUtils::clear(COLOR_BLACK); - DrawUtils::endDraw(); - } + DrawUtils::endDraw(); // flip buffers DrawUtils::setRedraw(true); // force a redraw when reentering return 0; + } uint32_t DrawUtils::deinitScreen() { - for (int i = 0; i<2; i++) // both buffers to black - { - DrawUtils::clear(COLOR_BLACK); - DrawUtils::endDraw(); - } - MEMHeapHandle heap = MEMGetBaseHeapHandle(MEM_BASE_HEAP_MEM1); MEMFreeByStateToFrmHeap(heap, CONSOLE_FRAME_HEAP_TAG); sConsoleHasForeground = FALSE; return 0; + } @@ -123,11 +109,6 @@ void DrawUtils::setRedraw(bool value) { redraw = value; } -void DrawUtils::initBuffers(void *sBufferTV_, void *sBufferDRC_) { - DrawUtils::tvBuffer = (uint8_t *) sBufferTV_; - DrawUtils::drcBuffer = (uint8_t *) sBufferDRC_; -} - void DrawUtils::beginDraw() { uint32_t pixel = *(uint32_t *) tvBuffer; @@ -144,13 +125,6 @@ void DrawUtils::beginDraw() { } void DrawUtils::endDraw() { - // OSScreenFlipBuffersEx already flushes the cache? - // DCFlushRange(tvBuffer, sBufferSizeTV); - // DCFlushRange(drcBuffer, sBufferSizeDRC); - - DCFlushRange(sBufferTV, sBufferSizeTV); - DCFlushRange(sBufferDRC, sBufferSizeDRC); - OSScreenFlipBuffersEx(SCREEN_DRC); OSScreenFlipBuffersEx(SCREEN_TV); } From 093dcc41ad00205dce3d701379dd923e2d6ebc3b Mon Sep 17 00:00:00 2001 From: w3irDv <170813473+w3irDv@users.noreply.github.com> Date: Wed, 7 Aug 2024 23:39:22 +0200 Subject: [PATCH 9/9] includes housekeeping --- include/utils/StateUtils.h | 2 ++ src/main.cpp | 6 +++--- src/utils/DrawUtils.cpp | 12 +++++------- src/utils/StateUtils.cpp | 7 ++----- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/include/utils/StateUtils.h b/include/utils/StateUtils.h index 9891335..4c399fa 100644 --- a/include/utils/StateUtils.h +++ b/include/utils/StateUtils.h @@ -1,5 +1,7 @@ #pragma once +#include + class State { public: static void init(); diff --git a/src/main.cpp b/src/main.cpp index c2cd2ba..fd3deed 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,3 @@ -#include -#include -#include #include #include #include @@ -16,6 +13,9 @@ #include #include #include +#include +#include +#include static int wiiuTitlesCount = 0, vWiiTitlesCount = 0; diff --git a/src/utils/DrawUtils.cpp b/src/utils/DrawUtils.cpp index 078b3c9..471de02 100644 --- a/src/utils/DrawUtils.cpp +++ b/src/utils/DrawUtils.cpp @@ -1,16 +1,14 @@ -#include -#include +#include +#include #include #include #include -#include -#include -#include #include +#include #include - -#include #include +#include +#include #include #include #include diff --git a/src/utils/StateUtils.cpp b/src/utils/StateUtils.cpp index 95048cc..da6b270 100644 --- a/src/utils/StateUtils.cpp +++ b/src/utils/StateUtils.cpp @@ -1,16 +1,13 @@ +#include +#include #include #include #include #include -#include -#include -#include #include #include -#include - bool State::aroma = false;