summaryrefslogtreecommitdiff
path: root/apps/menus
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-06-06 12:56:23 +0000
committerThomas Martitz <kugel@rockbox.org>2010-06-06 12:56:23 +0000
commit4320310fec2e86433e507cd4120d0551980d88af (patch)
tree73801532c20dbef63655b0794b0960b55ba58fe3 /apps/menus
parent1582e6fa75a4c54561dcb629b05ada8a756a3a07 (diff)
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
Diffstat (limited to 'apps/menus')
-rw-r--r--apps/menus/main_menu.c19
1 files changed, 10 insertions, 9 deletions
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);