mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-22 03:22:48 -05:00
Remove browse_context_init()
Prefer to use designated initializers to avoid having to specify unneeded parameters. Non-initialized members are zero-initialized by the compiler. Change-Id: Ia6a03c45cb3ef0b30f458d7d0ae1604a350c737c
This commit is contained in:
parent
701e262d3d
commit
6c52fa139c
17 changed files with 117 additions and 108 deletions
|
|
@ -200,16 +200,19 @@ static bool tv_statusbar_setting(void)
|
|||
|
||||
static bool tv_font_setting(void)
|
||||
{
|
||||
struct browse_context browse;
|
||||
char font[MAX_PATH], name[MAX_FILENAME+10];
|
||||
|
||||
rb->snprintf(name, sizeof(name), "%s.fnt", new_prefs.font_name);
|
||||
rb->browse_context_init(&browse, SHOW_FONT,
|
||||
BROWSE_SELECTONLY|BROWSE_NO_CONTEXT_MENU,
|
||||
"Font", Icon_Menu_setting, FONT_DIR, name);
|
||||
|
||||
browse.buf = font;
|
||||
browse.bufsize = sizeof(font);
|
||||
struct browse_context browse = {
|
||||
.dirfilter = SHOW_FONT,
|
||||
.flags = BROWSE_SELECTONLY | BROWSE_NO_CONTEXT_MENU,
|
||||
.title = "Font", /* XXX: Translate? */
|
||||
.icon = Icon_Menu_setting,
|
||||
.root = FONT_DIR,
|
||||
.selected = name,
|
||||
.buf = font,
|
||||
.bufsize = sizeof(font),
|
||||
};
|
||||
|
||||
rb->rockbox_browse(&browse);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue