Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

More meaningful name and type for 'root menu' setting

The patch changes 'int root_menu' to 'bool root_menu_customized'
which better expresses what the value means.

Change-Id: Ic272ac161fc05f5d3298e1e46578977dd590ebaf

+6 -6
+3 -3
apps/root_menu.c
··· 549 549 if (!main_menu_added) 550 550 root_menu__[menu_item_count++] = (struct menu_item_ex *)&menu_; 551 551 root_menu_.flags |= MENU_ITEM_COUNT(menu_item_count); 552 - *(int*)setting = 1; 552 + *(bool*)setting = true; 553 553 } 554 554 555 555 char* root_menu_write_to_cfg(void* setting, char*buf, int buf_len) ··· 586 586 root_menu__[i] = (struct menu_item_ex *)menu_table[i].item; 587 587 } 588 588 root_menu_.flags |= MENU_ITEM_COUNT(MAX_MENU_ITEMS); 589 - *(int*)setting = 0; 589 + *(bool*)setting = false; 590 590 } 591 591 592 592 bool root_menu_is_changed(void* setting, void* defaultval) 593 593 { 594 594 (void)defaultval; 595 - return *(int*)setting != 0; 595 + return *(bool*)setting; 596 596 } 597 597 598 598 static int item_callback(int action, const struct menu_item_ex *this_item)
+2 -2
apps/settings.h
··· 823 823 #endif 824 824 825 825 char start_directory[MAX_PATHNAME+1]; 826 - /* status setting for the root menu customisability. 0 = default, 1 = loaded from cfg */ 827 - int root_menu; 826 + /* Has the root been customized from the .cfg file? false = no, true = loaded from cfg */ 827 + bool root_menu_customized; 828 828 }; 829 829 830 830 /** global variables **/
+1 -1
apps/settings_list.c
··· 1921 1921 "resume rewind", UNIT_SEC, 0, 60, 5, 1922 1922 NULL, NULL, NULL), 1923 1923 #endif 1924 - CUSTOM_SETTING(0, root_menu, 1924 + CUSTOM_SETTING(0, root_menu_customized, 1925 1925 LANG_ROCKBOX_TITLE, /* lang string here is never actually used */ 1926 1926 NULL, "root menu order", 1927 1927 root_menu_load_from_cfg, root_menu_write_to_cfg,