bootloader: Add animated ticker for VOL- wait

Now an animated line is drawn while bootlogo wait is active.
This will remind user to press VOL- if needed and also give visible feedback.

A new config key was added to disable it for custom bootlogos. Set `noticker=1` in `[config]` section.
It always show for default hekate one.

For now now there's no GUI option for it.
This commit is contained in:
CTCaer
2022-10-11 07:49:17 +03:00
parent 9c1238f99d
commit 414721a1ff
11 changed files with 487 additions and 340 deletions

View File

@@ -30,6 +30,7 @@ void set_default_configuration()
h_cfg.autoboot = 0;
h_cfg.autoboot_list = 0;
h_cfg.bootwait = 3;
h_cfg.noticker = 0;
h_cfg.backlight = 100;
h_cfg.autohosoff = 0;
h_cfg.autonogc = 1;
@@ -115,6 +116,10 @@ int create_config_entry()
itoa(h_cfg.backlight, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\nnoticker=", &fp);
itoa(h_cfg.noticker, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\nautohosoff=", &fp);
itoa(h_cfg.autohosoff, lbuf, 10);
f_puts(lbuf, &fp);
@@ -130,6 +135,7 @@ int create_config_entry()
f_puts("\nbootprotect=", &fp);
itoa(h_cfg.bootprotect, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\n", &fp);
if (mainIniFound)
@@ -200,30 +206,39 @@ int create_nyx_config_entry(bool force_unmount)
f_puts("[config]\nthemecolor=", &fp);
itoa(n_cfg.theme_color, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\nentries5col=", &fp);
itoa(n_cfg.entries_5_col, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\ntimeoff=", &fp);
itoa(n_cfg.timeoff, lbuf, 16);
f_puts(lbuf, &fp);
f_puts("\nhomescreen=", &fp);
itoa(n_cfg.home_screen, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\nverification=", &fp);
itoa(n_cfg.verification, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\numsemmcrw=", &fp);
itoa(n_cfg.ums_emmc_rw, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\njcdisable=", &fp);
itoa(n_cfg.jc_disable, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\njcforceright=", &fp);
itoa(n_cfg.jc_force_right, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\nbpmpclock=", &fp);
itoa(n_cfg.bpmp_clock, lbuf, 10);
f_puts(lbuf, &fp);
f_puts("\n", &fp);
f_close(&fp);

View File

@@ -27,6 +27,7 @@ typedef struct _hekate_config
u32 autoboot;
u32 autoboot_list;
u32 bootwait;
u32 noticker;
u32 backlight;
u32 autohosoff;
u32 autonogc;

View File

@@ -233,6 +233,8 @@ static void _load_saved_configuration()
if (h_cfg.backlight <= 20)
h_cfg.backlight = 30;
}
else if (!strcmp("noticker", kv->key))
h_cfg.noticker = atoi(kv->val);
else if (!strcmp("autohosoff", kv->key))
h_cfg.autohosoff = atoi(kv->val);
else if (!strcmp("autonogc", kv->key))