summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-10-28 21:57:30 +0000
committerJens Arnold <amiconn@rockbox.org>2005-10-28 21:57:30 +0000
commiteb87ad5e328bedf313c20640d6f0e003c653ba4b (patch)
tree45909889c4ba09541c770170b42269434c1a4054
parentc01b987ccafc4074292a063ef6fe0112ff30d12d (diff)
downloadrockbox-eb87ad5e328bedf313c20640d6f0e003c653ba4b.tar.gz
rockbox-eb87ad5e328bedf313c20640d6f0e003c653ba4b.tar.bz2
rockbox-eb87ad5e328bedf313c20640d6f0e003c653ba4b.zip
H1x0: Fixed the non-working Stop in the file browser. Ondios: Added the same feature.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7677 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/tree.c10
-rw-r--r--apps/tree.h1
2 files changed, 6 insertions, 5 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 7d4ee7f703..b26221a0fe 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -649,14 +649,14 @@ static bool dirbrowse(void)
break;
#ifdef TREE_OFF
-#if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF)
case TREE_OFF:
if (*tc.dirfilter < NUM_FILTER_MODES)
{
- /* Stop the music if it is playing, else power off */
+ /* Stop the music if it is playing */
if(audio_status())
audio_stop();
- else {
+#if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF)
+ else {
if (!charger_inserted()) {
if(shutdown_screen())
reload_dir = true;
@@ -665,9 +665,9 @@ static bool dirbrowse(void)
}
restore = true;
}
+#endif
}
break;
-#endif
#if defined(HAVE_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING)
case TREE_OFF | BUTTON_REPEAT:
if (charger_inserted()) {
@@ -676,7 +676,7 @@ static bool dirbrowse(void)
}
break;
#endif
-#endif
+#endif /* TREE_OFF */
case TREE_MENU:
#ifdef TREE_RC_MENU
case TREE_RC_MENU:
diff --git a/apps/tree.h b/apps/tree.h
index 04532c887d..00d22c4d24 100644
--- a/apps/tree.h
+++ b/apps/tree.h
@@ -107,6 +107,7 @@
#define TREE_RUN_PRE BUTTON_RIGHT
#define TREE_MENU (BUTTON_MENU | BUTTON_REPEAT)
#define TREE_MENU_PRE BUTTON_MENU
+#define TREE_OFF BUTTON_OFF
#define TREE_WPS (BUTTON_MENU | BUTTON_REL)
#define TREE_WPS_PRE BUTTON_MENU
#define TREE_CONTEXT (BUTTON_RIGHT | BUTTON_REPEAT)