From 67566330a5ab7e8fa2445cbf21ae00180d495731 Mon Sep 17 00:00:00 2001 From: ZetaDesigns Date: Fri, 8 Sep 2017 20:52:26 +0200 Subject: [PATCH 1/2] fix indentation and **properly** fix the compile error --- source/draw.c | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/source/draw.c b/source/draw.c index 1773e3f..c295843 100644 --- a/source/draw.c +++ b/source/draw.c @@ -155,33 +155,33 @@ void throw_error(char* error, int error_type) { switch (error_type) { case ERROR: - while (aptMainLoop()) - { - hidScanInput(); - u32 kDown = hidKeysDown(); - draw_base_interface(); - pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_RED, error); - pp2d_draw_wtext(70, 150, 0.8, 0.8, COLOR_WHITE, L"Press \uE000 to shut down."); - pp2d_end_draw(); - if (kDown & KEY_A) { - if (homebrew) - APT_HardwareResetAsync(); - else { - srvPublishToSubscriber(0x202, 0); - } - } - } - case WARNING: - while (aptMainLoop()) - { - hidScanInput(); - u32 kDown = hidKeysDown(); - draw_base_interface(); - pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_YELLOW, error); - pp2d_draw_wtext(70, 150, 0.8, 0.8, COLOR_WHITE, L"Press \uE000 to continue."); - pp2d_end_draw(); - if (kDown & KEY_A) break; - } + while (aptMainLoop()) + { + hidScanInput(); + u32 kDown = hidKeysDown(); + draw_base_interface(); + pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_RED, error); + pp2d_draw_wtext(70, 150, 0.8, 0.8, COLOR_WHITE, L"Press \uE000 to shut down."); + pp2d_end_draw(); + if (kDown & KEY_A) { + if (envIsHomebrew()) + APT_HardwareResetAsync(); + else { + srvPublishToSubscriber(0x202, 0); + } + } + } + case WARNING: + while (aptMainLoop()) + { + hidScanInput(); + u32 kDown = hidKeysDown(); + draw_base_interface(); + pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_YELLOW, error); + pp2d_draw_wtext(70, 150, 0.8, 0.8, COLOR_WHITE, L"Press \uE000 to continue."); + pp2d_end_draw(); + if (kDown & KEY_A) break; + } break; } pp2d_end_draw(); @@ -200,9 +200,9 @@ void draw_theme_install(int install_type) case 2: pp2d_draw_text_center(GFX_TOP, 120, 0.8, 0.8, COLOR_WHITE, "Installing BGM..."); break; - case 3: - pp2d_draw_text_center(GFX_TOP, 120, 0.8, 0.8, COLOR_WHITE, "Downloading..."); - break; + case 3: + pp2d_draw_text_center(GFX_TOP, 120, 0.8, 0.8, COLOR_WHITE, "Downloading..."); + break; default: break; } From 3fb86c80bebcb033da5c9a98829c8f28d3c980b8 Mon Sep 17 00:00:00 2001 From: Helloman892 <1565516+Helloman892@users.noreply.github.com> Date: Fri, 8 Sep 2017 20:00:21 +0100 Subject: [PATCH 2/2] finally fixed everything homebrew wasn't actually global, smh --- source/draw.c | 2 +- source/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/draw.c b/source/draw.c index c295843..3a3964e 100644 --- a/source/draw.c +++ b/source/draw.c @@ -164,7 +164,7 @@ void throw_error(char* error, int error_type) { pp2d_draw_wtext(70, 150, 0.8, 0.8, COLOR_WHITE, L"Press \uE000 to shut down."); pp2d_end_draw(); if (kDown & KEY_A) { - if (envIsHomebrew()) + if (homebrew) APT_HardwareResetAsync(); else { srvPublishToSubscriber(0x202, 0); diff --git a/source/main.c b/source/main.c index 4c03e1f..10ed6a3 100644 --- a/source/main.c +++ b/source/main.c @@ -41,7 +41,7 @@ int init_services(void) ptmuInit(); httpcInit(0); archive_result = open_archives(); - bool homebrew = true; + homebrew = true; if (!envIsHomebrew()) { homebrew = false;