From 4320310fec2e86433e507cd4120d0551980d88af Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 6 Jun 2010 12:56:23 +0000 Subject: Use SYS_FS_CHANGED and a slight rework in the recalculation of free disk space in the Rockbox Info screen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26624 a1c6a512-1295-4272-9138-f99709370657 --- apps/menus/main_menu.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'apps/menus') diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 76ceaa483e..3dd6348e57 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c @@ -33,6 +33,7 @@ #include "misc.h" #include "exported_menus.h" #include "tree.h" +#include "storage.h" #ifdef HAVE_RECORDING #include "recording.h" #endif @@ -341,24 +342,24 @@ static int info_action_callback(int action, struct gui_synclist *lists) if (action == ACTION_STD_CANCEL) return action; else if ((action == ACTION_STD_OK) -#ifdef HAVE_MULTIVOLUME - || action == SYS_HOTSWAP_INSERTED - || action == SYS_HOTSWAP_EXTRACTED +#ifdef HAVE_HOTSWAP + || action == SYS_FS_CHANGED #endif ) { #ifndef SIMULATOR struct info_data *info = (struct info_data *)lists->data; + int i; info->new_data = true; splash(0, ID2P(LANG_SCANNING_DISK)); - fat_recalc_free(IF_MV(0)); -#ifdef HAVE_MULTIVOLUME - if (fat_ismounted(1)) - fat_recalc_free(1); + for (i = 0; i < NUM_VOLUMES; i++) + { +#ifdef HAVE_HOTSWAP + if (fat_ismounted(i)) #endif - + fat_recalc_free(IF_MV(i)); + } #else - (void) lists; #endif gui_synclist_speak_item(lists); -- cgit v1.2.3