config: utilize devmode variable
This holds the NX hw state.
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
void set_default_configuration()
|
void set_default_configuration()
|
||||||
{
|
{
|
||||||
h_cfg.t210b01 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210B01;
|
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 = 0;
|
||||||
h_cfg.autoboot_list = 0;
|
h_cfg.autoboot_list = 0;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ typedef struct _hekate_config
|
|||||||
u32 bootprotect;
|
u32 bootprotect;
|
||||||
// Global temporary config.
|
// Global temporary config.
|
||||||
bool t210b01;
|
bool t210b01;
|
||||||
|
bool devmode;
|
||||||
bool emummc_force_disable;
|
bool emummc_force_disable;
|
||||||
bool rcm_patched;
|
bool rcm_patched;
|
||||||
u32 errors;
|
u32 errors;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ void print_fuseinfo()
|
|||||||
gfx_con_setpos(0, 0);
|
gfx_con_setpos(0, 0);
|
||||||
|
|
||||||
gfx_printf("\nSKU: %X - ", FUSE(FUSE_SKU_INFO));
|
gfx_printf("\nSKU: %X - ", FUSE(FUSE_SKU_INFO));
|
||||||
switch (fuse_read_hw_state())
|
switch (h_cfg.devmode)
|
||||||
{
|
{
|
||||||
case FUSE_NX_HW_STATE_PROD:
|
case FUSE_NX_HW_STATE_PROD:
|
||||||
gfx_printf("Retail\n");
|
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",
|
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,
|
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);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1182,7 +1182,7 @@ static void _show_errors()
|
|||||||
|
|
||||||
static void _check_low_battery()
|
static void _check_low_battery()
|
||||||
{
|
{
|
||||||
if (fuse_read_hw_state() == FUSE_NX_HW_STATE_DEV)
|
if (h_cfg.devmode)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
int enough_battery;
|
int enough_battery;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
void set_default_configuration()
|
void set_default_configuration()
|
||||||
{
|
{
|
||||||
h_cfg.t210b01 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210B01;
|
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 = 0;
|
||||||
h_cfg.autoboot_list = 0;
|
h_cfg.autoboot_list = 0;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ typedef struct _hekate_config
|
|||||||
u32 bootprotect;
|
u32 bootprotect;
|
||||||
// Global temporary config.
|
// Global temporary config.
|
||||||
bool t210b01;
|
bool t210b01;
|
||||||
|
bool devmode;
|
||||||
bool emummc_force_disable;
|
bool emummc_force_disable;
|
||||||
bool rcm_patched;
|
bool rcm_patched;
|
||||||
bool autorcm_enabled;
|
bool autorcm_enabled;
|
||||||
|
|||||||
@@ -781,7 +781,7 @@ lv_res_t mbox_action(lv_obj_t *btns, const char *txt)
|
|||||||
|
|
||||||
bool nyx_emmc_check_battery_enough()
|
bool nyx_emmc_check_battery_enough()
|
||||||
{
|
{
|
||||||
if (fuse_read_hw_state() == FUSE_NX_HW_STATE_DEV)
|
if (h_cfg.devmode)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
int batt_volt = 0;
|
int batt_volt = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user