summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-27 19:41:58 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-27 19:41:58 +0000
commitb3d0b6ea2a9a75080c502f77fada8c23a62368c2 (patch)
tree12b7b789739b4c313a82dbc92519382c767aab15
parent3cb353eb0d4b9f77dc8780d6bdf79630f1d30136 (diff)
downloadrockbox-b3d0b6ea2a9a75080c502f77fada8c23a62368c2.zip
rockbox-b3d0b6ea2a9a75080c502f77fada8c23a62368c2.tar.gz
rockbox-b3d0b6ea2a9a75080c502f77fada8c23a62368c2.tar.bz2
rockbox-b3d0b6ea2a9a75080c502f77fada8c23a62368c2.tar.xz
Better button and play status handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1464 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/tree.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 7feb3ba..57731cb 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -290,6 +290,7 @@ bool dirbrowse(char *root)
char buf[MAX_PATH];
int i;
int rc;
+ int button;
memcpy(currdir,root,sizeof(currdir));
numentries = showdir(root, start);
@@ -322,7 +323,8 @@ bool dirbrowse(char *root)
}
lcd_update();
- switch ( button_get(true) ) {
+ button = button_get(true);
+ switch ( button & ~BUTTON_REPEAT) {
case TREE_EXIT:
if ( play_mode == 1 )
play_mode = 0;
@@ -489,6 +491,11 @@ bool dirbrowse(char *root)
}
case BUTTON_ON:
+ /* The mpeg thread may have stopped playing, so we'd
+ better update our status */
+ if(!mpeg_is_playing())
+ play_mode = 0;
+
if ( play_mode ) {
lcd_stop_scroll();
rc = wps_show();