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
This commit is contained in:
Alexander Levin 2010-04-12 16:44:02 +00:00
parent 5209ed44a0
commit bfd53beda4
2 changed files with 5 additions and 3 deletions

View file

@ -1218,7 +1218,9 @@ struct hotkey_assignment {
int item; /* Bit or'd hotkey_action and HOTKEY_CTX_x */ int item; /* Bit or'd hotkey_action and HOTKEY_CTX_x */
struct menu_func func; /* Function to run if this entry is selected */ struct menu_func func; /* Function to run if this entry is selected */
int return_code; /* What to return after the function is run */ 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} #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]); static const int num_hotkey_items = sizeof(hotkey_items) / sizeof(hotkey_items[0]);
/* Return the language ID for the input function */ /* 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; int i;
for (i = 0; i < num_hotkey_items; i++) for (i = 0; i < num_hotkey_items; i++)

View file

@ -32,7 +32,7 @@ enum {
}; };
#ifdef HAVE_HOTKEY #ifdef HAVE_HOTKEY
char* get_hotkey_desc(int hk_func); const char* get_hotkey_desc(int hk_func);
#endif #endif
#endif #endif