diff options
| author | Alexander Levin <al.le@rockbox.org> | 2010-04-12 16:44:02 +0000 |
|---|---|---|
| committer | Alexander Levin <al.le@rockbox.org> | 2010-04-12 16:44:02 +0000 |
| commit | bfd53beda4c9abd470b6980e9b2d0ea6774b6876 (patch) | |
| tree | 4f8b774eb57adf342e5041f1d798c5a19f11c305 | |
| parent | 5209ed44a0b6f86e1d1f2a92d42d7658b2dc316e (diff) | |
| download | rockbox-bfd53beda4c9abd470b6980e9b2d0ea6774b6876.zip rockbox-bfd53beda4c9abd470b6980e9b2d0ea6774b6876.tar.gz rockbox-bfd53beda4c9abd470b6980e9b2d0ea6774b6876.tar.bz2 rockbox-bfd53beda4c9abd470b6980e9b2d0ea6774b6876.tar.xz | |
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
| -rw-r--r-- | apps/onplay.c | 6 | ||||
| -rw-r--r-- | apps/onplay.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 33d3a4d..e2037ad 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++) diff --git a/apps/onplay.h b/apps/onplay.h index a5a5a5f..5a834d5 100644 --- a/apps/onplay.h +++ b/apps/onplay.h @@ -32,7 +32,7 @@ enum { }; #ifdef HAVE_HOTKEY -char* get_hotkey_desc(int hk_func); +const char* get_hotkey_desc(int hk_func); #endif #endif |