summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 1a92dfd3a9..03c7d2ca37 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -946,21 +946,25 @@ static bool dirbrowse(const char *root, const int *dirfilter)
946 break; 946 break;
947 947
948#ifdef TREE_OFF 948#ifdef TREE_OFF
949#ifndef HAVE_SW_POWEROFF
949 case TREE_OFF: 950 case TREE_OFF:
950 /* Stop the music if it is playing, else show the shutdown 951 if (*dirfilter < NUM_FILTER_MODES)
951 screen */ 952 {
952 if(mpeg_status()) 953 /* Stop the music if it is playing, else show the shutdown
953 mpeg_stop(); 954 screen */
954 else { 955 if(mpeg_status())
955 if (!charger_inserted()) { 956 mpeg_stop();
956 shutdown_screen(); 957 else {
957 } else { 958 if (!charger_inserted()) {
958 charging_splash(); 959 shutdown_screen();
960 } else {
961 charging_splash();
962 }
963 restore = true;
959 } 964 }
960 restore = true;
961 } 965 }
962 break; 966 break;
963 967#endif
964 case TREE_OFF | BUTTON_REPEAT: 968 case TREE_OFF | BUTTON_REPEAT:
965 if (charger_inserted()) { 969 if (charger_inserted()) {
966 charging_splash(); 970 charging_splash();