summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorHenrik Backe <henrik@backe.eu>2004-03-21 18:56:06 +0000
committerHenrik Backe <henrik@backe.eu>2004-03-21 18:56:06 +0000
commitbe21ab8abf08cabb23bdac3bd38689a62a84f66e (patch)
tree2af64c3e656f9aa044fed2dd96b9e507b54e4d46 /apps
parent590e6af88816d5b181370ccd45a9f25eb367da76 (diff)
downloadrockbox-be21ab8abf08cabb23bdac3bd38689a62a84f66e.tar.gz
rockbox-be21ab8abf08cabb23bdac3bd38689a62a84f66e.tar.bz2
rockbox-be21ab8abf08cabb23bdac3bd38689a62a84f66e.zip
Adds USB detection on changed bootfile question
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4426 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-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;
}