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 /apps | |
| parent | 143da86b021242944c5d594a550dd91d757e1fa0 (diff) | |
| download | rockbox-7f67717b00433b8fc1a7624a491c446d3c021bfe.zip rockbox-7f67717b00433b8fc1a7624a491c446d3c021bfe.tar.gz rockbox-7f67717b00433b8fc1a7624a491c446d3c021bfe.tar.bz2 rockbox-7f67717b00433b8fc1a7624a491c446d3c021bfe.tar.xz | |
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
Diffstat (limited to 'apps')
| -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 b0f6674..c755c95 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -549,6 +549,8 @@ static int showdir(char *path, int start) static bool ask_resume(bool ask_once) { + bool stop = false; + #ifdef HAVE_LCD_CHARCELLS lcd_double_height(false); #endif @@ -568,14 +570,27 @@ static bool ask_resume(bool ask_once) #endif lcd_update(); - switch (button_get(true)) { - case BUTTON_PLAY: - case BUTTON_RC_PLAY: - return true; + while (!stop) { + switch (button_get(true)) { + case BUTTON_PLAY: + case BUTTON_RC_PLAY: + return true; - case SYS_USB_CONNECTED: - usb_screen(); - break; + /* ignore the ON button, since it might + still be pressed since booting */ + case BUTTON_ON: + case BUTTON_ON | BUTTON_REL: + break; + + case SYS_USB_CONNECTED: + usb_screen(); + stop = true; + break; + + default: + stop = true; + break; + } } if ( global_settings.resume == RESUME_ASK_ONCE && ask_once) { |