From 00efbe66d0841d4ea3dcff6f3ada434fa1507b23 Mon Sep 17 00:00:00 2001 From: Pokes303 Date: Sun, 6 Oct 2019 17:05:13 +0200 Subject: [PATCH] Update 1.1 --- src/main.cpp | 15 ++++----------- src/status.cpp | 25 ++----------------------- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f112df86..cef1fcc2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -148,8 +148,9 @@ uint8_t downloadFile(std::string url, std::string file, uint8_t type) { //Types: 0 = .app | 1 = .h3 | 2 = title.tmd | 3 = tilte.tik downloading = file.c_str(); - WHBLogPrintf("Download URL: %s", url.c_str()); - WHBLogPrintf("Download NAME: %s", file.c_str()); + //WHBLogPrintf("Download URL: %s", url.c_str()); + //WHBLogPrintf("Download NAME: %s", file.c_str()); + CURL* curl = NULL; FILE* fp; int ret = 0; @@ -165,7 +166,6 @@ uint8_t downloadFile(std::string url, std::string file, uint8_t type) { curl_easy_cleanup(curl); return 1; } - WHBLogPrintf("curl_easy_init executed successfully"); std::string tUrl = downloadUrl + url; std::string tFile = installDir + file; @@ -636,10 +636,8 @@ int main() { ddnext: disableShutdown(); - if (!downloadTitle(titleID, titleVer, folderName)) { - WHBLogPrintf("return"); + if (!downloadTitle(titleID, titleVer, folderName)) goto exit; - } downloadUrl = "http://ccs.cdn.wup.shop.nintendo.net/ccs/download/"; installDir = "/vol/external01/install/"; @@ -658,20 +656,15 @@ int main() { mainLoop:; } exit: - WHBLogPrintf("SWKBD"); SWKBD_Shutdown(); - WHBLogPrintf("screen"); if (hbl) shutdownScreen(); - WHBLogPrintf("fs"); FSDelClient(fsCli, 0); MEMFreeToDefaultHeap(fsCli); MEMFreeToDefaultHeap(fsCmd); - WHBLogPrintf("fs shutdown"); FSShutdown(); - WHBLogPrintf("proc&udp"); if (hbl) WHBProcShutdown(); WHBLogUdpDeinit(); diff --git a/src/status.cpp b/src/status.cpp index ce313e19..177f6228 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -12,34 +12,22 @@ uint8_t app = 1; uint8_t AppRunning() { if (!hbl) { - if(!OSIsMainCore()) { - WHBLogPrintf("Os not main core"); + if(!OSIsMainCore()) ProcUISubProcessMessages(true); - } else { - WHBLogPrintf("haha yess"); ProcUIStatus status = ProcUIProcessMessages(true); - WHBLogPrintf("status: %d", status); switch (status) { case PROCUI_STATUS_EXITING: { - WHBLogPrintf("exiting"); // Being closed, deinit, free, and prepare to exit - WHBLogPrintf("procui"); ProcUIShutdown(); - WHBLogPrintf("screen"); - WHBLogPrintf("ok!"); app = 0; break; } case PROCUI_STATUS_RELEASE_FOREGROUND: { - WHBLogPrintf("release"); // Free up MEM1 to next foreground app, deinit screen, etc. - ProcUIDrawDoneRelease(); - //shutdownScreen(); - WHBGfxInit(); WHBGfxBeginRender(); @@ -53,14 +41,11 @@ uint8_t AppRunning() { WHBGfxFinishRender(); - WHBLogPrintf("draw ok"); app = 2; - WHBLogPrintf("-------------------"); - //OSScreenShutdown();?? break; } case PROCUI_STATUS_IN_FOREGROUND: { - WHBLogPrintf("foreground"); + // Executed while app is in foreground if (app == 2) { WHBGfxShutdown(); shutdownScreen(); @@ -68,19 +53,13 @@ uint8_t AppRunning() { } app = 1; - // Executed while app is in foreground break; } case PROCUI_STATUS_IN_BACKGROUND: { - WHBLogPrintf("background"); app = 2; break; } - default: { - WHBLogPrintf("default"); - } } - WHBLogPrintf("app: %d", app); return app; } }