Fix improper shift and mask order causing FS#6842
Set start_selected if exiting do_menu() early from more places
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12826 a1c6a512-1295-4272-9138-f99709370657
diff --git a/apps/menu.h b/apps/menu.h
index 6d7d113..ded2550 100644
--- a/apps/menu.h
+++ b/apps/menu.h
@@ -61,6 +61,7 @@
#define MENU_COUNT_MASK 0xFFF
#define MENU_COUNT_SHIFT 8
#define MENU_ITEM_COUNT(c) ((c&MENU_COUNT_MASK)<<MENU_COUNT_SHIFT)
+#define MENU_GET_COUNT(flags) ((flags>>MENU_COUNT_SHIFT)&MENU_COUNT_MASK)
struct menu_item_ex {
unsigned int flags; /* above defines */