diff options
Diffstat (limited to 'apps/main.c')
-rw-r--r-- | apps/main.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/apps/main.c b/apps/main.c index 693577a72f..fe33bab5c0 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -97,21 +97,34 @@ void init(void) | |||
97 | 97 | ||
98 | usb_init(); | 98 | usb_init(); |
99 | 99 | ||
100 | rc = ata_init(); | 100 | backlight_init(); |
101 | if(rc) | 101 | |
102 | panicf("ata: %d",rc); | 102 | button_init(); |
103 | 103 | ||
104 | rc = ata_init(); | ||
105 | if(!rc) | ||
106 | { | ||
107 | #ifdef ARCHOS_RECORDER | ||
108 | char str[32]; | ||
109 | lcd_clear_display(); | ||
110 | snprintf(str, 31, "ATA error: %d", rc); | ||
111 | lcd_puts(0, 1, str); | ||
112 | lcd_puts(0, 3, "Press ON to debug"); | ||
113 | lcd_update(); | ||
114 | while(button_get(true) != BUTTON_ON) {}; | ||
115 | dbg_ports(); | ||
116 | #endif | ||
117 | panicf("ata: %d", rc); | ||
118 | } | ||
119 | |||
104 | pinfo = disk_init(); | 120 | pinfo = disk_init(); |
105 | if (!pinfo) | 121 | if (!pinfo) |
106 | panicf("disk: NULL"); | 122 | panicf("disk: NULL"); |
107 | 123 | ||
108 | rc = fat_mount(pinfo[0].start); | 124 | rc = fat_mount(pinfo[0].start); |
109 | if(rc) | 125 | if(rc) |
110 | panicf("mount: %d",rc); | 126 | panicf("mount: %d",rc); |
111 | 127 | ||
112 | backlight_init(); | ||
113 | |||
114 | button_init(); | ||
115 | mpeg_init( global_settings.volume, | 128 | mpeg_init( global_settings.volume, |
116 | global_settings.bass, | 129 | global_settings.bass, |
117 | global_settings.treble ); | 130 | global_settings.treble ); |