summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/menu.c6
-rw-r--r--apps/tree.c31
-rw-r--r--apps/tree.h8
-rw-r--r--apps/wps.c9
-rw-r--r--apps/wps.h2
5 files changed, 48 insertions, 8 deletions
diff --git a/apps/menu.c b/apps/menu.c
index 126d29f40a..6966bc990e 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -317,10 +317,11 @@ int menu_show(int m)
317 317
318 switch( key ) { 318 switch( key ) {
319 case MENU_PREV: 319 case MENU_PREV:
320 case MENU_PREV | BUTTON_REPEAT:
320#ifdef MENU_RC_PREV 321#ifdef MENU_RC_PREV
321 case MENU_RC_PREV: 322 case MENU_RC_PREV:
323 case MENU_RC_PREV | BUTTON_REPEAT:
322#endif 324#endif
323 case MENU_PREV | BUTTON_REPEAT:
324 if (menus[m].cursor) { 325 if (menus[m].cursor) {
325 /* keep the cursor at 1/3 of the screen */ 326 /* keep the cursor at 1/3 of the screen */
326 if (menus[m].top && menus[m].cursor - menus[m].top < 327 if (menus[m].top && menus[m].cursor - menus[m].top <
@@ -339,10 +340,11 @@ int menu_show(int m)
339 break; 340 break;
340 341
341 case MENU_NEXT: 342 case MENU_NEXT:
343 case MENU_NEXT | BUTTON_REPEAT:
342#ifdef MENU_RC_NEXT 344#ifdef MENU_RC_NEXT
343 case MENU_RC_NEXT: 345 case MENU_RC_NEXT:
346 case MENU_RC_NEXT | BUTTON_REPEAT:
344#endif 347#endif
345 case MENU_NEXT | BUTTON_REPEAT:
346 if (menus[m].cursor < menus[m].itemcount-1) { 348 if (menus[m].cursor < menus[m].itemcount-1) {
347 /* keep the cursor at 2/3 of the screen */ 349 /* keep the cursor at 2/3 of the screen */
348 if (menus[m].itemcount - menus[m].top > menu_lines && 350 if (menus[m].itemcount - menus[m].top > menu_lines &&
diff --git a/apps/tree.c b/apps/tree.c
index da0e54c815..cba8b56a6d 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -468,9 +468,14 @@ static bool ask_resume(bool ask_once)
468#else 468#else
469 case TREE_RUN: 469 case TREE_RUN:
470#endif 470#endif
471
472#ifdef TREE_RC_RUN_PRE
473 case TREE_RC_RUN_PRE: /* catch the press, not the release */
474#else
471#ifdef TREE_RC_RUN 475#ifdef TREE_RC_RUN
472 case TREE_RC_RUN: 476 case TREE_RC_RUN:
473#endif 477#endif
478#endif
474 ignore_power = false; 479 ignore_power = false;
475 /* Don't ignore the power button for subsequent calls */ 480 /* Don't ignore the power button for subsequent calls */
476 return true; 481 return true;
@@ -722,6 +727,9 @@ static bool dirbrowse(void)
722 button = button_get(true); 727 button = button_get(true);
723 switch (button) { 728 switch (button) {
724 case TREE_RUN: 729 case TREE_RUN:
730#ifdef TREE_RC_RUN
731 case TREE_RC_RUN:
732#endif
725 rolo_load("/" BOOTFILE); 733 rolo_load("/" BOOTFILE);
726 stop = true; 734 stop = true;
727 break; 735 break;
@@ -747,10 +755,17 @@ static bool dirbrowse(void)
747#ifdef TREE_RC_ENTER 755#ifdef TREE_RC_ENTER
748 case TREE_RC_ENTER: 756 case TREE_RC_ENTER:
749#endif 757#endif
758#ifdef TREE_RC_RUN
759 case TREE_RC_RUN:
760#endif
750 case TREE_RUN: 761 case TREE_RUN:
751#ifdef TREE_RUN_PRE 762#ifdef TREE_RUN_PRE
752 if ((button == TREE_RUN) && 763 if (((button == TREE_RUN)
753 (lastbutton != TREE_RUN_PRE)) 764#ifdef TREE_RC_RUN_PRE
765 || (button == TREE_RC_RUN))
766 && ((lastbutton != TREE_RC_RUN_PRE)
767#endif
768 && (lastbutton != TREE_RUN_PRE)))
754 break; 769 break;
755#endif 770#endif
756 if ( !numentries ) 771 if ( !numentries )
@@ -1014,8 +1029,15 @@ static bool dirbrowse(void)
1014 break; 1029 break;
1015 1030
1016 case TREE_WPS: 1031 case TREE_WPS:
1032#ifdef TREE_RC_WPS
1033 case TREE_RC_WPS:
1034#endif
1017#ifdef TREE_WPS_PRE 1035#ifdef TREE_WPS_PRE
1018 if (lastbutton != TREE_WPS_PRE) 1036 if ((lastbutton != TREE_WPS_PRE)
1037#ifdef TREE_RC_WPS
1038 && (lastbutton != TREE_RC_WPS_PRE)
1039#endif
1040 )
1019 break; 1041 break;
1020#endif 1042#endif
1021 /* don't enter wps from plugin browser etc */ 1043 /* don't enter wps from plugin browser etc */
@@ -1059,6 +1081,9 @@ static bool dirbrowse(void)
1059#endif 1081#endif
1060 1082
1061 case TREE_CONTEXT: 1083 case TREE_CONTEXT:
1084#ifdef TREE_RC_CONTEXT
1085 case TREE_RC_CONTEXT:
1086#endif
1062#ifdef TREE_CONTEXT2 1087#ifdef TREE_CONTEXT2
1063 case TREE_CONTEXT2: 1088 case TREE_CONTEXT2:
1064#endif 1089#endif
diff --git a/apps/tree.h b/apps/tree.h
index 5db786de49..dc7de24506 100644
--- a/apps/tree.h
+++ b/apps/tree.h
@@ -43,9 +43,13 @@
43#define TREE_RC_NEXT BUTTON_RC_FF 43#define TREE_RC_NEXT BUTTON_RC_FF
44#define TREE_RC_PREV BUTTON_RC_REW 44#define TREE_RC_PREV BUTTON_RC_REW
45#define TREE_RC_EXIT BUTTON_RC_STOP 45#define TREE_RC_EXIT BUTTON_RC_STOP
46#define TREE_RC_ENTER BUTTON_RC_ON 46//#define TREE_RC_ENTER BUTTON_RC_ON
47#define TREE_RC_RUN BUTTON_RC_ON 47#define TREE_RC_RUN (BUTTON_RC_ON | BUTTON_REL)
48#define TREE_RC_RUN_PRE BUTTON_RC_ON
48#define TREE_RC_MENU BUTTON_RC_MENU 49#define TREE_RC_MENU BUTTON_RC_MENU
50#define TREE_RC_WPS (BUTTON_RC_VOL | BUTTON_REL)
51#define TREE_RC_WPS_PRE BUTTON_RC_VOL
52#define TREE_RC_CONTEXT (BUTTON_RC_ON | BUTTON_REPEAT)
49 53
50#elif CONFIG_KEYPAD == RECORDER_PAD 54#elif CONFIG_KEYPAD == RECORDER_PAD
51#define TREE_NEXT BUTTON_DOWN 55#define TREE_NEXT BUTTON_DOWN
diff --git a/apps/wps.c b/apps/wps.c
index 783f2528ba..9848be0965 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -470,9 +470,16 @@ long wps_show(void)
470 470
471 switch(button) 471 switch(button)
472 { 472 {
473#ifdef WPS_RC_BROWSE
474 case WPS_RC_BROWSE:
475#endif
473 case WPS_BROWSE: 476 case WPS_BROWSE:
474#ifdef WPS_BROWSE_PRE 477#ifdef WPS_BROWSE_PRE
475 if (lastbutton != WPS_BROWSE_PRE) 478 if ((lastbutton != WPS_BROWSE_PRE)
479#ifdef WPS_RC_BROWSE_PRE
480 && (lastbutton != WPS_RC_BROWSE_PRE)
481#endif
482 )
476 break; 483 break;
477#endif 484#endif
478#ifdef HAVE_LCD_CHARCELLS 485#ifdef HAVE_LCD_CHARCELLS
diff --git a/apps/wps.h b/apps/wps.h
index 091ec80553..2a2df85d2e 100644
--- a/apps/wps.h
+++ b/apps/wps.h
@@ -48,6 +48,8 @@
48#define WPS_RC_EXIT BUTTON_RC_STOP 48#define WPS_RC_EXIT BUTTON_RC_STOP
49#define WPS_RC_MENU (BUTTON_RC_MENU | BUTTON_REL) 49#define WPS_RC_MENU (BUTTON_RC_MENU | BUTTON_REL)
50#define WPS_RC_MENU_PRE BUTTON_RC_MENU 50#define WPS_RC_MENU_PRE BUTTON_RC_MENU
51#define WPS_RC_BROWSE (BUTTON_RC_VOL | BUTTON_REL)
52#define WPS_RC_BROWSE_PRE BUTTON_RC_VOL
51 53
52#elif CONFIG_KEYPAD == RECORDER_PAD 54#elif CONFIG_KEYPAD == RECORDER_PAD
53#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL) 55#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)