diff options
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 31 |
1 files changed, 28 insertions, 3 deletions
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 |