summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/tree.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 2098f03e4f..2a630fd4fc 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -907,6 +907,8 @@ static bool dirbrowse(char *root, int *dirfilter)
#ifndef SIMULATOR
if (boot_changed) {
+ bool stop = false;
+
lcd_clear_display();
lcd_puts(0,0,str(LANG_BOOT_CHANGED));
lcd_puts(0,1,str(LANG_REBOOT_NOW));
@@ -915,8 +917,24 @@ static bool dirbrowse(char *root, int *dirfilter)
lcd_puts(0,4,str(LANG_CANCEL_WITH_ANY_RECORDER));
lcd_update();
#endif
- if (button_get(true) == BUTTON_PLAY)
- rolo_load("/" BOOTFILE);
+ while (!stop) {
+ switch (button_get(true)) {
+ case BUTTON_PLAY:
+ rolo_load("/" BOOTFILE);
+ stop = true;
+ break;
+
+ case SYS_USB_CONNECTED:
+ usb_screen();
+ stop = true;
+ break;
+
+ default:
+ stop = true;
+ break;
+ }
+ }
+
restore = true;
boot_changed = false;
}