config: utilize devmode variable

This holds the NX hw state.
This commit is contained in:
CTCaer
2025-08-08 15:07:48 +03:00
parent 2ea496d9d1
commit af71f46b12
7 changed files with 8 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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
{

View File

@@ -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;