summaryrefslogtreecommitdiffstats
path: root/apps/menus/plugin_menu.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-11-30 15:17:54 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-12-17 13:36:38 +0000
commit6c52fa139c5ad8f78ed4fdb306a6074228dbf4c9 (patch)
tree9d51172c8860a72e5081dc2706dd30f4dd295427 /apps/menus/plugin_menu.c
parent701e262d3d622898279167ba909da631ac460bc1 (diff)
downloadrockbox-6c52fa139c5ad8f78ed4fdb306a6074228dbf4c9.tar.gz
rockbox-6c52fa139c5ad8f78ed4fdb306a6074228dbf4c9.zip
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
Diffstat (limited to 'apps/menus/plugin_menu.c')
-rw-r--r--apps/menus/plugin_menu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/menus/plugin_menu.c b/apps/menus/plugin_menu.c
index cbc1ce03f2..fa0d721c05 100644
--- a/apps/menus/plugin_menu.c
+++ b/apps/menus/plugin_menu.c
@@ -54,11 +54,14 @@ static void pm_handler(unsigned short id, void *data)
static int plugins_menu(void* param)
{
intptr_t item = (intptr_t)param;
- struct browse_context browse;
int ret;
- browse_context_init(&browse, SHOW_PLUGINS, 0, str(items[item].id),
- Icon_Plugin, items[item].path, NULL);
+ struct browse_context browse = {
+ .dirfilter = SHOW_PLUGINS,
+ .title = str(items[item].id),
+ .icon = Icon_Plugin,
+ .root = items[item].path,
+ };
ret = rockbox_browse(&browse);