From e3421fd44e53a88d615118b7c13dd11faab25ec8 Mon Sep 17 00:00:00 2001 From: Aurora Wright Date: Wed, 14 Oct 2020 19:37:36 +0200 Subject: [PATCH] hos: Prevent sysmmc boot on emummc patch failure if emummc is forced --- bootloader/hos/hos.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bootloader/hos/hos.c b/bootloader/hos/hos.c index 5458be1..4e00803 100644 --- a/bootloader/hos/hos.c +++ b/bootloader/hos/hos.c @@ -949,11 +949,19 @@ int hos_launch(ini_sec_t *cfg) { EHPRINTFARGS("Failed to apply '%s'!", unappliedPatch); - gfx_puts("\nPress POWER to continue.\nPress VOL to go to the menu.\n"); + bool prevent_sysmmc_boot = false; + if (!strcmp(unappliedPatch, "emummc") && ctxt.emummc_forced) + prevent_sysmmc_boot = true; + + if (prevent_sysmmc_boot) + gfx_puts("\nPress POWER or VOL to go to the menu.\n"); + else + gfx_puts("\nPress POWER to continue.\nPress VOL to go to the menu.\n"); + display_backlight_brightness(h_cfg.backlight, 1000); u32 btn = btn_wait(); - if (!(btn & BTN_POWER)) + if (prevent_sysmmc_boot || !(btn & BTN_POWER)) { _free_launch_components(&ctxt); goto error; // MUST stop here, because if user requests 'nogc' but it's not applied, their GC controller gets updated!