From bfd53beda4c9abd470b6980e9b2d0ea6774b6876 Mon Sep 17 00:00:00 2001 From: Alexander Levin Date: Mon, 12 Apr 2010 16:44:02 +0000 Subject: Mark const return value; correct the comment about valid menu items for the hotkey git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25607 a1c6a512-1295-4272-9138-f99709370657 --- apps/onplay.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/onplay.c') diff --git a/apps/onplay.c b/apps/onplay.c index 33d3a4d21b..e2037ad4fa 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -1218,7 +1218,9 @@ struct hotkey_assignment { int item; /* Bit or'd hotkey_action and HOTKEY_CTX_x */ struct menu_func func; /* Function to run if this entry is selected */ int return_code; /* What to return after the function is run */ - const struct menu_item_ex *menu_addr; /* Must be a MENUITEM_FUNCTION */ + const struct menu_item_ex *menu_addr; /* Must have non-dynamic text, */ + /* i.e. have the flag MENU_HAS_DESC. E.g. be a MENUITEM_FUNCTION */ + /* For all possibilities see menu.h. */ }; #define HOTKEY_FUNC(func, param) {{(void *)func}, param} @@ -1253,7 +1255,7 @@ static struct hotkey_assignment hotkey_items[] = { static const int num_hotkey_items = sizeof(hotkey_items) / sizeof(hotkey_items[0]); /* Return the language ID for the input function */ -char* get_hotkey_desc(int hk_func) +const char* get_hotkey_desc(int hk_func) { int i; for (i = 0; i < num_hotkey_items; i++) -- cgit v1.2.3