From cfda097394d752fde3b75ec2561ba752cd682e54 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 25 Nov 2009 22:54:36 +0000 Subject: Add HAVE_HOTSWAP_STORAGE_AS_MAIN to detect changed binary after re-inserting the storage on targets that run rockbox from hotswappable storage. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23752 a1c6a512-1295-4272-9138-f99709370657 --- apps/misc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'apps/misc.c') 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 -- cgit v1.2.3