summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/tree.c29
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
550static bool ask_resume(bool ask_once) 550static 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) {