mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-26 23:36:37 -04: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
|
|
@ -208,17 +208,16 @@ static int base32_encode(const uint8_t *data, int length, uint8_t *result,
|
|||
|
||||
static bool browse( char *dst, int dst_size, const char *start )
|
||||
{
|
||||
struct browse_context browse;
|
||||
|
||||
rb->browse_context_init(&browse, SHOW_ALL,
|
||||
BROWSE_SELECTONLY|BROWSE_NO_CONTEXT_MENU,
|
||||
NULL, NOICON, start, NULL);
|
||||
|
||||
browse.buf = dst;
|
||||
browse.bufsize = dst_size;
|
||||
struct browse_context browse = {
|
||||
.dirfilter = SHOW_ALL,
|
||||
.flags = BROWSE_SELECTONLY | BROWSE_NO_CONTEXT_MENU,
|
||||
.icon = Icon_NOICON,
|
||||
.root = start,
|
||||
.buf = dst,
|
||||
.bufsize = dst_size,
|
||||
};
|
||||
|
||||
rb->rockbox_browse(&browse);
|
||||
|
||||
return (browse.flags & BROWSE_SELECTED);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue