Fixed some bs
This commit is contained in:
@@ -2013,17 +2013,11 @@ failed_sd_mount:
|
||||
// Fills buf with theme-colored brand text: "hekate | OmniNX X.X.X Pack" from manifest.ini, or "hekate" if missing.
|
||||
static void _get_home_brand_text(char *buf, size_t buf_size)
|
||||
{
|
||||
static const char * const manifest_paths[] = {
|
||||
"config/omninx/manifest.ini",
|
||||
"bootloader/config/omninx/manifest.ini",
|
||||
};
|
||||
// SD is unmounted when the main menu is built; mount so we can read the manifest.
|
||||
sd_mount();
|
||||
link_t ini_sections;
|
||||
list_init(&ini_sections);
|
||||
int parsed = 0;
|
||||
for (u32 p = 0; p < sizeof(manifest_paths) / sizeof(manifest_paths[0]) && !parsed; p++)
|
||||
parsed = ini_parse(&ini_sections, manifest_paths[p], false);
|
||||
int parsed = ini_parse(&ini_sections, "config/omninx/manifest.ini", false);
|
||||
if (!parsed)
|
||||
{
|
||||
s_printf(buf, "%s%s", text_color, " hekate#");
|
||||
@@ -2033,13 +2027,7 @@ static void _get_home_brand_text(char *buf, size_t buf_size)
|
||||
const char *pack = NULL;
|
||||
LIST_FOREACH_ENTRY(ini_sec_t, ini_sec, &ini_sections, link)
|
||||
{
|
||||
if (ini_sec->type != INI_CHOICE)
|
||||
continue;
|
||||
// Accept [OmniNX] or [omninx] (case-insensitive).
|
||||
const char *n = ini_sec->name;
|
||||
if ((n[0] != 'O' && n[0] != 'o') || (n[1] != 'm' && n[1] != 'M') ||
|
||||
(n[2] != 'n' && n[2] != 'N') || (n[3] != 'i' && n[3] != 'I') ||
|
||||
(n[4] != 'N' && n[4] != 'n') || (n[5] != 'X' && n[5] != 'x') || n[6] != '\0')
|
||||
if (ini_sec->type != INI_CHOICE || !ini_sec->name || strcmp(ini_sec->name, "OmniNX") != 0)
|
||||
continue;
|
||||
LIST_FOREACH_ENTRY(ini_kv_t, kv, &ini_sec->kvs, link)
|
||||
{
|
||||
@@ -2058,17 +2046,7 @@ static void _get_home_brand_text(char *buf, size_t buf_size)
|
||||
s_printf(buf, "%s%s", text_color, " hekate#");
|
||||
return;
|
||||
}
|
||||
// Capitalize first letter of pack for display (e.g. light -> Light).
|
||||
char pack_display[24];
|
||||
size_t i = 0;
|
||||
while (pack[i] && i < sizeof(pack_display) - 1)
|
||||
{
|
||||
pack_display[i] = (i == 0 && pack[0] >= 'a' && pack[0] <= 'z')
|
||||
? (char)(pack[0] - 'a' + 'A') : pack[i];
|
||||
i++;
|
||||
}
|
||||
pack_display[i] = '\0';
|
||||
s_printf(buf, "%s hekate | OmniNX %s %s#", text_color, pack_display, version);
|
||||
s_printf(buf, "%s hekate | OmniNX %s %s#", text_color, pack, version);
|
||||
}
|
||||
|
||||
static void _create_tab_home(lv_theme_t *th, lv_obj_t *parent)
|
||||
|
||||
Reference in New Issue
Block a user