summaryrefslogtreecommitdiff
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-04-25 10:41:17 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-04-25 10:41:17 +0000
commit680acbf71ba6972c4690a340f6464dcc44e48b88 (patch)
treeb1c51a6aee780e05f166ab1e1411fc9067578019 /apps/root_menu.c
parent6ac306a515e560e01fdfd36495afb034ea6a5080 (diff)
downloadrockbox-680acbf71ba6972c4690a340f6464dcc44e48b88.tar.gz
rockbox-680acbf71ba6972c4690a340f6464dcc44e48b88.zip
fix a stupid bug which didnt check the flag correctly (caused the player to crash trying to access the shutdown options context menu)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13258 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index b51c3aeed7..9f1491df8e 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -377,7 +377,7 @@ static int get_selection(int last_screen)
377 unsigned int i; 377 unsigned int i;
378 for(i=0; i< sizeof(root_menu__)/sizeof(*root_menu__); i++) 378 for(i=0; i< sizeof(root_menu__)/sizeof(*root_menu__); i++)
379 { 379 {
380 if ((root_menu__[i]->flags&MT_RETURN_VALUE) && 380 if (((root_menu__[i]->flags&MENU_TYPE_MASK) == MT_RETURN_VALUE) &&
381 (root_menu__[i]->value == last_screen)) 381 (root_menu__[i]->value == last_screen))
382 { 382 {
383 return i; 383 return i;
@@ -408,7 +408,7 @@ static inline int load_screen(int screen)
408static int load_context_screen(int selection) 408static int load_context_screen(int selection)
409{ 409{
410 const struct menu_item_ex *context_menu = NULL; 410 const struct menu_item_ex *context_menu = NULL;
411 if (root_menu__[selection]->flags&MT_RETURN_VALUE) 411 if ((root_menu__[selection]->flags&MENU_TYPE_MASK) == MT_RETURN_VALUE)
412 { 412 {
413 int item = root_menu__[selection]->value; 413 int item = root_menu__[selection]->value;
414 context_menu = items[item].context_menu; 414 context_menu = items[item].context_menu;