From: chaoskagami Date: Thu, 18 Aug 2016 21:22:21 +0000 (-0400) Subject: Fix silent autoboot (broken by two commits ago) X-Git-Tag: v0.3.0~53 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=db73e479e3149c543d916167ac7eca5d9bf833bd;p=corbenik%2Fcorbenik.git Fix silent autoboot (broken by two commits ago) --- diff --git a/source/main.c b/source/main.c index d33d131..cb5185f 100644 --- a/source/main.c +++ b/source/main.c @@ -14,6 +14,8 @@ void shut_up(); int main(int argc, char** argv) { + int r_held = (ctr_hid_get_buttons() & CTR_HID_RT); + if (PDN_MPCORE_CFG == 7) is_n3ds = 1; // Enable n3ds specific options. @@ -31,16 +33,6 @@ main(int argc, char** argv) if (CFG_BOOTENV == 7) config->options[OPTION_EMUNAND] = 0; // Disable EmuNAND on AGB reboot. - if (config->options[OPTION_AUTOBOOT] && !(ctr_hid_get_buttons() & CTR_HID_RT)) { - doing_autoboot = 1; - - if (config->options[OPTION_SILENCE] || config->options[OPTION_SILENT_NOSCREEN]) - shut_up(); // This does exactly what it sounds like. - - if (config->options[OPTION_SILENT_NOSCREEN]) - boot_cfw(); // Skip all other checks and just boot. - } - set_font(PATH_TERMFONT); // Read the font before all else. // Check key down for autoboot @@ -54,9 +46,14 @@ main(int argc, char** argv) clear_disp(TOP_SCREEN); clear_disp(BOTTOM_SCREEN); - // Autoboot. Non-standard code path. - if (!doing_autoboot) + if (config->options[OPTION_AUTOBOOT] && !r_held) { + doing_autoboot = 1; + + if (config->options[OPTION_SILENCE]) + shut_up(); // This does exactly what it sounds like. + } else { menu_handler(); + } boot_cfw(); } diff --git a/source/std/draw.c b/source/std/draw.c index 65c38be..89ff74b 100644 --- a/source/std/draw.c +++ b/source/std/draw.c @@ -366,8 +366,6 @@ void shut_up() { kill_output = 1; // Immediately cancel all output operations. - clear_disp(TOP_SCREEN); - clear_disp(BOTTOM_SCREEN); } #define TEXT 0