1
0
Fork 0
forked from len0rd/rockbox

Add remote control support to tree and menu. Move defines from wps.c to wps.h

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6692 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Marcoen Hirschberg 2005-06-12 16:10:17 +00:00
parent 097444d07c
commit c19e0f0d02
6 changed files with 151 additions and 113 deletions

View file

@ -317,6 +317,9 @@ int menu_show(int m)
switch( key ) {
case MENU_PREV:
#ifdef MENU_RC_PREV
case MENU_RC_PREV:
#endif
case MENU_PREV | BUTTON_REPEAT:
if (menus[m].cursor) {
/* keep the cursor at 1/3 of the screen */
@ -336,6 +339,9 @@ int menu_show(int m)
break;
case MENU_NEXT:
#ifdef MENU_RC_NEXT
case MENU_RC_NEXT:
#endif
case MENU_NEXT | BUTTON_REPEAT:
if (menus[m].cursor < menus[m].itemcount-1) {
/* keep the cursor at 2/3 of the screen */
@ -356,6 +362,9 @@ int menu_show(int m)
case MENU_ENTER:
#ifdef MENU_ENTER2
case MENU_ENTER2:
#endif
#ifdef MENU_RC_ENTER
case MENU_RC_ENTER:
#endif
/* Erase current display state */
lcd_clear_display();
@ -367,6 +376,9 @@ int menu_show(int m)
#endif
#ifdef MENU_EXIT3
case MENU_EXIT3:
#endif
#ifdef MENU_RC_EXIT
case MENU_RC_EXIT:
#endif
lcd_stop_scroll();
exit = true;