mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-26 19:52:11 +00:00
tui: Localize status bar time keeping
This commit is contained in:
parent
21548545fc
commit
c613acb31d
3 changed files with 3 additions and 4 deletions
|
@ -37,7 +37,6 @@ void set_default_configuration()
|
||||||
h_cfg.autoboot_list = 0;
|
h_cfg.autoboot_list = 0;
|
||||||
h_cfg.bootwait = 3;
|
h_cfg.bootwait = 3;
|
||||||
h_cfg.se_keygen_done = 0;
|
h_cfg.se_keygen_done = 0;
|
||||||
h_cfg.sbar_time_keeping = 0;
|
|
||||||
h_cfg.backlight = 100;
|
h_cfg.backlight = 100;
|
||||||
h_cfg.autohosoff = 0;
|
h_cfg.autohosoff = 0;
|
||||||
h_cfg.autonogc = 1;
|
h_cfg.autonogc = 1;
|
||||||
|
|
|
@ -37,7 +37,6 @@ typedef struct _hekate_config
|
||||||
bool sept_run;
|
bool sept_run;
|
||||||
bool emummc_force_disable;
|
bool emummc_force_disable;
|
||||||
bool rcm_patched;
|
bool rcm_patched;
|
||||||
u32 sbar_time_keeping;
|
|
||||||
u32 errors;
|
u32 errors;
|
||||||
hos_eks_mbr_t *eks;
|
hos_eks_mbr_t *eks;
|
||||||
} hekate_config;
|
} hekate_config;
|
||||||
|
|
|
@ -35,15 +35,16 @@ extern hekate_config h_cfg;
|
||||||
void tui_sbar(bool force_update)
|
void tui_sbar(bool force_update)
|
||||||
{
|
{
|
||||||
u32 cx, cy;
|
u32 cx, cy;
|
||||||
|
static u32 sbar_time_keeping = 0;
|
||||||
|
|
||||||
u32 timePassed = get_tmr_s() - h_cfg.sbar_time_keeping;
|
u32 timePassed = get_tmr_s() - sbar_time_keeping;
|
||||||
if (!force_update)
|
if (!force_update)
|
||||||
if (timePassed < 5)
|
if (timePassed < 5)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
u8 prevFontSize = gfx_con.fntsz;
|
u8 prevFontSize = gfx_con.fntsz;
|
||||||
gfx_con.fntsz = 16;
|
gfx_con.fntsz = 16;
|
||||||
h_cfg.sbar_time_keeping = get_tmr_s();
|
sbar_time_keeping = get_tmr_s();
|
||||||
|
|
||||||
u32 battPercent = 0;
|
u32 battPercent = 0;
|
||||||
int battVoltCurr = 0;
|
int battVoltCurr = 0;
|
||||||
|
|
Loading…
Reference in a new issue