summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-03-25 12:29:34 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-03-25 12:29:34 +0000
commitb81a3c54a49a7adac76236f06a1b9327aac85cba (patch)
tree6193f61c5d2773df4a6dc64a931e631b377ec2dc /apps
parente701808b2ea0125623edc3dfa16bcc76779149c8 (diff)
downloadrockbox-b81a3c54a49a7adac76236f06a1b9327aac85cba.tar.gz
rockbox-b81a3c54a49a7adac76236f06a1b9327aac85cba.tar.bz2
rockbox-b81a3c54a49a7adac76236f06a1b9327aac85cba.zip
We now start monitoring USB earlier, and can enter USB mode from the debug partition viewer. This fixes bug #799491.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4438 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c5
-rw-r--r--apps/main.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 73c653af75..7739915162 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -45,6 +45,7 @@
#include "fat.h"
#include "dir.h"
#include "panic.h"
+#include "screens.h"
#ifdef HAVE_LCD_BITMAP
#include "widgets.h"
#include "peakmeter.h"
@@ -504,6 +505,10 @@ bool dbg_partitions(void)
if (partition > 3)
partition = 0;
break;
+
+ case SYS_USB_CONNECTED:
+ usb_screen();
+ return true;
}
}
return false;
diff --git a/apps/main.c b/apps/main.c
index 2c2f9ac854..7fdd30b654 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -153,6 +153,8 @@ void init(void)
(void)coldstart;
#endif
+ usb_start_monitoring();
+
rc = ata_init();
if(rc)
{
@@ -177,6 +179,7 @@ void init(void)
if (!fat_mount(pinfo[i].start))
break;
}
+
if ( i==4 ) {
DEBUGF("No partition found, trying to mount sector 0.\n");
rc = fat_mount(0);
@@ -186,15 +189,16 @@ void init(void)
lcd_puts(0,1,"partition!");
lcd_update();
sleep(HZ);
- while(1)
- dbg_partitions();
+ /* Don't leave until we have been in USB mode */
+ while(!dbg_partitions());
+
+ /* The USB thread will panic if the drive still can't be mounted */
}
}
settings_load();
status_init();
- usb_start_monitoring();
playlist_init();
tree_init();