diff --git a/console/Menu.cpp b/console/Menu.cpp index 71d9d0d..9d1e918 100644 --- a/console/Menu.cpp +++ b/console/Menu.cpp @@ -119,7 +119,7 @@ void Menu::display() console->drawColorString(5, 12, "Press [A] to install this package", 0xff, 0xff, 0x00); - if (cur->status != GET) + if (cur->status != GET && cur->status != LOCAL) console->drawColorString(5, 14, "Press [X] to remove this package", 0xff, 0xff, 0x00); console->drawString(5, 16, "Press [B] to go back"); diff --git a/console/console_main.cpp b/console/console_main.cpp index 646ac6f..5ef8c52 100644 --- a/console/console_main.cpp +++ b/console/console_main.cpp @@ -12,6 +12,7 @@ int console_main(RootDisplay* rootDisplay, InputEvents* input) { // initialize text console SDL_DestroyRenderer(rootDisplay->renderer); + rootDisplay->renderer = NULL; Console* console = new Console(rootDisplay->window); // create main menu object diff --git a/libs/chesto b/libs/chesto index 6b53cb4..27d321c 160000 --- a/libs/chesto +++ b/libs/chesto @@ -1 +1 @@ -Subproject commit 6b53cb4026e82f016eb5b422b0b1e201e5a35a63 +Subproject commit 27d321ccc069b5f95690587a92abbc4ad72b7c8e diff --git a/libs/get b/libs/get index c2d6f6a..ccb2a3f 160000 --- a/libs/get +++ b/libs/get @@ -1 +1 @@ -Subproject commit c2d6f6a3aa9074ee5fb07e78f094df95e269f937 +Subproject commit ccb2a3f64946980eab6599e7fc4ecb47e7ccf4fb diff --git a/main.cpp b/main.cpp index 4bfc025..f0ad18c 100644 --- a/main.cpp +++ b/main.cpp @@ -5,6 +5,10 @@ #if defined(__WIIU__) #include #include + + +#include +#include #endif #include "libs/get/src/Get.hpp" @@ -15,6 +19,7 @@ #include "console/Menu.hpp" + #include "main.hpp" static bool running = true; @@ -30,6 +35,9 @@ int main(int argc, char* argv[]) // stdout = stderr; // for yuzu #if defined(__WIIU__) + // WHBLogUdpInit(); + // WHBLogCafeInit(); + #define HBAS_PATH ROOT_PATH "wiiu/apps/appstore" #define ELF_PATH HBAS_PATH "/hbas.elf" #define RPX_PATH HBAS_PATH "/appstore.rpx" @@ -39,7 +47,22 @@ int main(int argc, char* argv[]) // "migrate" old elf users over to rpx (should've been done last version) struct stat sbuff; if (stat(ELF_PATH, &sbuff) == 0) - std::rename(ELF_PATH, RPX_PATH); + { + // hbas.elf exists... what should we do about it? + if (stat(RPX_PATH, &sbuff) == 0) + { + // rpx is here, we can just delete hbas.elf + // if we really have to, we can have wiiu-hbas.elf later for nostalgic people for the old version + int re = std::remove(ELF_PATH); + printf("Status removing folder... %d, %d: %s\n", re, errno, strerror(errno)); + } + else + { + // no rpx, let's move our elf there + int re = std::rename(ELF_PATH, RPX_PATH); + printf("Status renaming folder... %d, %d: %s\n", re, errno, strerror(errno)); + } + } #endif init_networking(); @@ -62,7 +85,7 @@ int main(int argc, char* argv[]) while (events->update()) { cliMode |= (events->held(L_BUTTON) || events->held(R_BUTTON)); } - SDL_Delay(32); + SDL_Delay(16); } if (cliMode) @@ -72,6 +95,9 @@ int main(int argc, char* argv[]) console_main(display, events); running = false; } + else + // start music (only if MUSIC defined) + display->initAndStartMusic(); DownloadQueue::init(); @@ -132,5 +158,9 @@ int main(int argc, char* argv[]) socketExit(); #endif +#if defined(__WIIU__) + // WHBLogUdpDeinit(); +#endif + return 0; }