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/target/hosted/sdl/button-sdl.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'firmware/target') diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c index 1ed07c153c..9677f1dd23 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.2.3