summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-12-09 15:39:32 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-12-09 15:39:32 +0000
commitb17fe5a72722352747111bcb188b4821135ce0b6 (patch)
tree6c252b310ac3aa9890622eb9529c47fac97e7cb6 /apps
parentcf1317c336c946ee2eeda61729171bae82d87769 (diff)
Added recalculation of free disk space. Press PLAY in Debug->Disk Info->Free to run it. Takes ~30 sec on my 40GB Toshiba.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2968 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 4c1c9893cb..2dbe472456 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -40,6 +40,7 @@
#include "mpeg.h"
#include "settings.h"
#include "ata.h"
+#include "fat.h"
#ifdef HAVE_LCD_BITMAP
#include "widgets.h"
#include "peakmeter.h"
@@ -1149,7 +1150,16 @@ static bool dbg_disk_info(void)
lcd_puts(0, y++, buf);
break;
- case 3:
+ case 3: {
+ unsigned int free;
+ fat_size( NULL, &free );
+ snprintf(buf, sizeof buf, "%d MB", free / 1024 );
+ lcd_puts(0, y++, "Free");
+ lcd_puts(0, y++, buf);
+ break;
+ }
+
+ case 4:
snprintf(buf, sizeof buf, "%d ms", ata_spinup_time * (1000/HZ));
lcd_puts(0, y++, "Spinup time");
lcd_puts(0, y++, buf);
@@ -1177,6 +1187,17 @@ static bool dbg_disk_info(void)
if (++page > max_page)
page = 0;
break;
+
+ case BUTTON_PLAY:
+ if (page == 3) {
+ mpeg_stop(); /* stop playback, to avoid disk access */
+ lcd_clear_display();
+ lcd_puts(0,0,"Scanning");
+ lcd_puts(0,1,"disk...");
+ lcd_update();
+ fat_recalc_free();
+ }
+ break;
}
lcd_stop_scroll();
}