From facbaab1953f9ab355fb3a3259dc0acbaabd9cc5 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 21 Feb 2014 11:25:07 +0100 Subject: simulator: Simulate external storage for HAVE_MULTIDRIVE. The virtual external storage can be inserted/extracted with the e key. This has little effect because there is no way to access the storage (yet, a later commit will change this). Except on ondio where the mmc needs to be extracted before entering USB (like on real target). Change-Id: I523402832f3b4ae71e0603b281aba4fb8592a897 --- firmware/export/config/sim.h | 3 --- firmware/target/hosted/sdl/button-sdl.c | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'firmware') diff --git a/firmware/export/config/sim.h b/firmware/export/config/sim.h index cec500e..2f819b7 100644 --- a/firmware/export/config/sim.h +++ b/firmware/export/config/sim.h @@ -29,9 +29,6 @@ #undef AMS_OF_SIZE -#undef HAVE_MULTIDRIVE -#undef NUM_DRIVES -#undef HAVE_HOTSWAP #undef HAVE_HOTSWAP_STORAGE_AS_MAIN #undef HAVE_STORAGE_FLUSH diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c index 1ed07c1..9677f1d 100644 --- a/firmware/target/hosted/sdl/button-sdl.c +++ b/firmware/target/hosted/sdl/button-sdl.c @@ -56,6 +56,7 @@ static int mouse_coords = 0; #else #define USB_KEY SDLK_u #endif +#define EXT_KEY SDLK_e #if defined(IRIVER_H100_SERIES) || defined (IRIVER_H300_SERIES) int _remote_type=REMOTETYPE_H100_LCD; @@ -322,6 +323,12 @@ static void button_event(int key, bool pressed) sim_trigger_usb(usb_connected); } return; +#ifdef HAVE_MULTIDRIVE + case EXT_KEY: + if (!pressed) + sim_trigger_external(!storage_present(1)); + return; +#endif #endif #if (CONFIG_PLATFORM & PLATFORM_PANDORA) case SDLK_LCTRL: -- cgit v1.1