1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-09 20:11:50 +00:00

tui: Localize status bar time keeping

This commit is contained in:
CTCaer 2020-06-13 18:33:44 +03:00
parent 21548545fc
commit c613acb31d
3 changed files with 3 additions and 4 deletions

View file

@ -37,7 +37,6 @@ void set_default_configuration()
h_cfg.autoboot_list = 0;
h_cfg.bootwait = 3;
h_cfg.se_keygen_done = 0;
h_cfg.sbar_time_keeping = 0;
h_cfg.backlight = 100;
h_cfg.autohosoff = 0;
h_cfg.autonogc = 1;

View file

@ -37,7 +37,6 @@ typedef struct _hekate_config
bool sept_run;
bool emummc_force_disable;
bool rcm_patched;
u32 sbar_time_keeping;
u32 errors;
hos_eks_mbr_t *eks;
} hekate_config;

View file

@ -35,15 +35,16 @@ extern hekate_config h_cfg;
void tui_sbar(bool force_update)
{
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 (timePassed < 5)
return;
u8 prevFontSize = gfx_con.fntsz;
gfx_con.fntsz = 16;
h_cfg.sbar_time_keeping = get_tmr_s();
sbar_time_keeping = get_tmr_s();
u32 battPercent = 0;
int battVoltCurr = 0;