Merge pull request #500 from AuroraWright/master

hos: Prevent booting emummc with failed emummc patching
This commit is contained in:
CTCaer 2020-10-17 23:02:34 +03:00 committed by GitHub
commit 9da0e0358b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -949,11 +949,14 @@ 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");
display_backlight_brightness(h_cfg.backlight, 1000);
bool emmc_patch_failed = !strcmp(unappliedPatch, "emummc");
if (!emmc_patch_failed)
{
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 (emmc_patch_failed || !(btn_wait() & 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!