diff --git a/bootloader/config.c b/bootloader/config.c index 1fdfe9cc..f627f2de 100644 --- a/bootloader/config.c +++ b/bootloader/config.c @@ -25,6 +25,7 @@ void set_default_configuration() { h_cfg.t210b01 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210B01; + h_cfg.devmode = fuse_read_hw_state(); h_cfg.autoboot = 0; h_cfg.autoboot_list = 0; diff --git a/bootloader/config.h b/bootloader/config.h index 07d5986b..c5792e97 100644 --- a/bootloader/config.h +++ b/bootloader/config.h @@ -35,6 +35,7 @@ typedef struct _hekate_config u32 bootprotect; // Global temporary config. bool t210b01; + bool devmode; bool emummc_force_disable; bool rcm_patched; u32 errors; diff --git a/bootloader/frontend/fe_info.c b/bootloader/frontend/fe_info.c index bcbc38c8..6b1a23a5 100644 --- a/bootloader/frontend/fe_info.c +++ b/bootloader/frontend/fe_info.c @@ -37,7 +37,7 @@ void print_fuseinfo() gfx_con_setpos(0, 0); gfx_printf("\nSKU: %X - ", FUSE(FUSE_SKU_INFO)); - switch (fuse_read_hw_state()) + switch (h_cfg.devmode) { case FUSE_NX_HW_STATE_PROD: gfx_printf("Retail\n"); @@ -238,7 +238,7 @@ void print_sdcard_info() gfx_printf("%kFound %s volume:%k\n Free: %d MiB\n Cluster: %d KiB\n", TXT_CLR_CYAN_L, sd_fs.fs_type == FS_EXFAT ? "exFAT" : "FAT32", TXT_CLR_DEFAULT, sd_fs.free_clst * sd_fs.csize >> SECTORS_TO_MIB_COEFF, (sd_fs.csize > 1) ? (sd_fs.csize >> 1) : 512); - f_mount(NULL, "", 1); + f_unmount(""); } else { diff --git a/bootloader/main.c b/bootloader/main.c index 4ec3eaba..a7f3f0ce 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -1182,7 +1182,7 @@ static void _show_errors() static void _check_low_battery() { - if (fuse_read_hw_state() == FUSE_NX_HW_STATE_DEV) + if (h_cfg.devmode) goto out; int enough_battery; diff --git a/nyx/nyx_gui/config.c b/nyx/nyx_gui/config.c index 32c7ad19..3474350b 100644 --- a/nyx/nyx_gui/config.c +++ b/nyx/nyx_gui/config.c @@ -25,6 +25,7 @@ void set_default_configuration() { h_cfg.t210b01 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210B01; + h_cfg.devmode = fuse_read_hw_state(); h_cfg.autoboot = 0; h_cfg.autoboot_list = 0; diff --git a/nyx/nyx_gui/config.h b/nyx/nyx_gui/config.h index f05b37a3..8f846f19 100644 --- a/nyx/nyx_gui/config.h +++ b/nyx/nyx_gui/config.h @@ -35,6 +35,7 @@ typedef struct _hekate_config u32 bootprotect; // Global temporary config. bool t210b01; + bool devmode; bool emummc_force_disable; bool rcm_patched; bool autorcm_enabled; diff --git a/nyx/nyx_gui/frontend/gui.c b/nyx/nyx_gui/frontend/gui.c index 39e68f32..e9d96d31 100644 --- a/nyx/nyx_gui/frontend/gui.c +++ b/nyx/nyx_gui/frontend/gui.c @@ -781,7 +781,7 @@ lv_res_t mbox_action(lv_obj_t *btns, const char *txt) bool nyx_emmc_check_battery_enough() { - if (fuse_read_hw_state() == FUSE_NX_HW_STATE_DEV) + if (h_cfg.devmode) return true; int batt_volt = 0;