summaryrefslogtreecommitdiff
path: root/apps/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/misc.c')
-rw-r--r--apps/misc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/misc.c b/apps/misc.c
index 6677c5f9b9..307592e346 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -79,7 +79,8 @@
#include "playback.h"
#ifdef BOOTFILE
-#if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF)
+#if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) \
+ || defined(HAVE_HOTSWAP_STORAGE_AS_MAIN)
#include "rolo.h"
#endif
#endif
@@ -606,6 +607,13 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame
audio_resume();
return SYS_CAR_ADAPTER_RESUME;
#endif
+#ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN
+ case SYS_FS_CHANGED:
+ system_flush();
+ check_bootfile(true); /* state gotten in main.c:init() */
+ system_restore();
+ return SYS_FS_CHANGED;
+#endif
#ifdef HAVE_HEADPHONE_DETECTION
case SYS_PHONE_PLUGGED:
unplug_change(true);
@@ -682,7 +690,7 @@ int show_logo( void )
}
#ifdef BOOTFILE
-#if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF)
+#if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) || defined(HAVE_HOTSWAP_STORAGE_AS_MAIN)
/*
memorize/compare details about the BOOTFILE
we don't use dircache because it may not be up to date after