forked from len0rd/rockbox
Adds USB detection on changed bootfile question
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4426 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
590e6af888
commit
be21ab8abf
1 changed files with 20 additions and 2 deletions
22
apps/tree.c
22
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue