diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-27 19:41:58 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-27 19:41:58 +0000 |
commit | b3d0b6ea2a9a75080c502f77fada8c23a62368c2 (patch) | |
tree | 12b7b789739b4c313a82dbc92519382c767aab15 | |
parent | 3cb353eb0d4b9f77dc8780d6bdf79630f1d30136 (diff) | |
download | rockbox-b3d0b6ea2a9a75080c502f77fada8c23a62368c2.tar.gz rockbox-b3d0b6ea2a9a75080c502f77fada8c23a62368c2.zip |
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.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c index 7feb3ba8e7..57731cbb28 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -290,6 +290,7 @@ bool dirbrowse(char *root) | |||
290 | char buf[MAX_PATH]; | 290 | char buf[MAX_PATH]; |
291 | int i; | 291 | int i; |
292 | int rc; | 292 | int rc; |
293 | int button; | ||
293 | 294 | ||
294 | memcpy(currdir,root,sizeof(currdir)); | 295 | memcpy(currdir,root,sizeof(currdir)); |
295 | numentries = showdir(root, start); | 296 | numentries = showdir(root, start); |
@@ -322,7 +323,8 @@ bool dirbrowse(char *root) | |||
322 | } | 323 | } |
323 | lcd_update(); | 324 | lcd_update(); |
324 | 325 | ||
325 | switch ( button_get(true) ) { | 326 | button = button_get(true); |
327 | switch ( button & ~BUTTON_REPEAT) { | ||
326 | case TREE_EXIT: | 328 | case TREE_EXIT: |
327 | if ( play_mode == 1 ) | 329 | if ( play_mode == 1 ) |
328 | play_mode = 0; | 330 | play_mode = 0; |
@@ -489,6 +491,11 @@ bool dirbrowse(char *root) | |||
489 | } | 491 | } |
490 | 492 | ||
491 | case BUTTON_ON: | 493 | case BUTTON_ON: |
494 | /* The mpeg thread may have stopped playing, so we'd | ||
495 | better update our status */ | ||
496 | if(!mpeg_is_playing()) | ||
497 | play_mode = 0; | ||
498 | |||
492 | if ( play_mode ) { | 499 | if ( play_mode ) { |
493 | lcd_stop_scroll(); | 500 | lcd_stop_scroll(); |
494 | rc = wps_show(); | 501 | rc = wps_show(); |