diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-03-04 01:22:25 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-03-04 01:22:25 +0000 |
commit | a61a7fa7aea82a2ead1b0c4ac4b476254589b959 (patch) | |
tree | 92885aeb8973c525d0631eb3e4a91e923cb31dfa /apps/root_menu.c | |
parent | 55843fdedd2781228a13d1da2032b9adf3eb943b (diff) |
Try to set the selection correclty the first time the Rockbox menu is
entered. Fixes FS#6715
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12578 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r-- | apps/root_menu.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c index 270fbb0669..f71eec7e53 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -311,6 +311,19 @@ void root_menu(void) ret_val = (int)global_status.last_screen; else ret_val = global_settings.start_in_screen - 2; + /* try to select the start item if its not the menu */ + if (ret_val != GO_TO_ROOT) + { + unsigned int i; + for(i=0; i< sizeof(root_menu__)/sizeof(*root_menu__) - 1; i++) + { + if (root_menu__[i]->value == ret_val) + { + selected = i; + break; + } + } + } while (true) { switch (ret_val) |