diff options
author | Björn Stenberg <bjorn@haxx.se> | 2003-08-06 17:30:40 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2003-08-06 17:30:40 +0000 |
commit | 7f67717b00433b8fc1a7624a491c446d3c021bfe (patch) | |
tree | f35495818157af0053d3c5d474b2f756fb31fe14 | |
parent | 143da86b021242944c5d594a550dd91d757e1fa0 (diff) | |
download | rockbox-7f67717b00433b8fc1a7624a491c446d3c021bfe.tar.gz rockbox-7f67717b00433b8fc1a7624a491c446d3c021bfe.zip |
Ignore ON button in ask_resume(), to avoid mistakenly cancelling resume.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3925 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/tree.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/apps/tree.c b/apps/tree.c index b0f6674ea5..c755c9550a 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -549,6 +549,8 @@ static int showdir(char *path, int start) | |||
549 | 549 | ||
550 | static bool ask_resume(bool ask_once) | 550 | static bool ask_resume(bool ask_once) |
551 | { | 551 | { |
552 | bool stop = false; | ||
553 | |||
552 | #ifdef HAVE_LCD_CHARCELLS | 554 | #ifdef HAVE_LCD_CHARCELLS |
553 | lcd_double_height(false); | 555 | lcd_double_height(false); |
554 | #endif | 556 | #endif |
@@ -568,14 +570,27 @@ static bool ask_resume(bool ask_once) | |||
568 | #endif | 570 | #endif |
569 | lcd_update(); | 571 | lcd_update(); |
570 | 572 | ||
571 | switch (button_get(true)) { | 573 | while (!stop) { |
572 | case BUTTON_PLAY: | 574 | switch (button_get(true)) { |
573 | case BUTTON_RC_PLAY: | 575 | case BUTTON_PLAY: |
574 | return true; | 576 | case BUTTON_RC_PLAY: |
577 | return true; | ||
575 | 578 | ||
576 | case SYS_USB_CONNECTED: | 579 | /* ignore the ON button, since it might |
577 | usb_screen(); | 580 | still be pressed since booting */ |
578 | break; | 581 | case BUTTON_ON: |
582 | case BUTTON_ON | BUTTON_REL: | ||
583 | break; | ||
584 | |||
585 | case SYS_USB_CONNECTED: | ||
586 | usb_screen(); | ||
587 | stop = true; | ||
588 | break; | ||
589 | |||
590 | default: | ||
591 | stop = true; | ||
592 | break; | ||
593 | } | ||
579 | } | 594 | } |
580 | 595 | ||
581 | if ( global_settings.resume == RESUME_ASK_ONCE && ask_once) { | 596 | if ( global_settings.resume == RESUME_ASK_ONCE && ask_once) { |