From 0b3ea1bfcba0e56e72cacfcb88944dcf2e3b3a07 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 12 Oct 2004 11:00:19 +0000 Subject: Now the FM, V2 and Ondio players use the new SYS_POWEROFF event. Now you can safely turn off the player by holding OFF. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5259 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'apps/tree.c') diff --git a/apps/tree.c b/apps/tree.c index 1a92dfd..03c7d2c 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -946,21 +946,25 @@ static bool dirbrowse(const char *root, const int *dirfilter) break; #ifdef TREE_OFF +#ifndef HAVE_SW_POWEROFF case TREE_OFF: - /* Stop the music if it is playing, else show the shutdown - screen */ - if(mpeg_status()) - mpeg_stop(); - else { - if (!charger_inserted()) { - shutdown_screen(); - } else { - charging_splash(); + if (*dirfilter < NUM_FILTER_MODES) + { + /* Stop the music if it is playing, else show the shutdown + screen */ + if(mpeg_status()) + mpeg_stop(); + else { + if (!charger_inserted()) { + shutdown_screen(); + } else { + charging_splash(); + } + restore = true; } - restore = true; } break; - +#endif case TREE_OFF | BUTTON_REPEAT: if (charger_inserted()) { charging_splash(); -- cgit v1.1