summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-09-20 03:07:29 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2019-09-20 03:07:29 -0500
commit10e5e56f3c62383afba30b553fac1ee624a8428d (patch)
tree4431aa03b77fb7724933c8ac21c53a26d545f869 /apps/root_menu.c
parentd0883d747ab7eb7a26364f01d2ab2f5445fbc204 (diff)
downloadrockbox-10e5e56f3c62383afba30b553fac1ee624a8428d.tar.gz
rockbox-10e5e56f3c62383afba30b553fac1ee624a8428d.zip
Bug fix dynamic menus
Dynamic menus had a buffer_len variable in the parent function but it was discarded before passing to the callbacks Why!!?? No clue but everything that used it was assuming MAXPATH Wouldn't be surprised to see some bugs pop out from this one.. init_menu_lists() was assuming MENU_HAS_DESC and setting the menu title + icon based on such even though it could be invalid didn't see anywhere in the code that was currently using MENU_DYNAMIC_DESC in relation to a top level menu but considering it caused all kinds of corruption to the menu when I tried its probably been tried and abandoned before... Change-Id: I8d961d748918bfa8ea6adb5ad60491af4d739d6e
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 6b3e213831..584328bd4b 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -454,9 +454,10 @@ MENUITEM_RETURNVALUE(rocks_browser, ID2P(LANG_PLUGINS), GO_TO_BROWSEPLUGINS,
MENUITEM_RETURNVALUE(playlist_browser, ID2P(LANG_CATALOG), GO_TO_PLAYLIST_VIEWER,
NULL, Icon_Playlist);
-static char *get_wps_item_name(int selected_item, void * data, char *buffer)
+static char *get_wps_item_name(int selected_item, void * data,
+ char *buffer, size_t buffer_len)
{
- (void)selected_item; (void)data; (void)buffer;
+ (void)selected_item; (void)data; (void)buffer; (void)buffer_len;
if (audio_status())
return ID2P(LANG_NOW_PLAYING);
return ID2P(LANG_RESUME_PLAYBACK);