summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted/sdl
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-02-21 11:25:07 +0100
committerThomas Martitz <kugel@rockbox.org>2014-02-23 20:23:51 +0100
commitfacbaab1953f9ab355fb3a3259dc0acbaabd9cc5 (patch)
treec1fa92517f9eca705f66a1b88667aa41b3299fe3 /firmware/target/hosted/sdl
parent77f19f75eb3661b3e3966da20effa2631ed380f1 (diff)
downloadrockbox-facbaab1953f9ab355fb3a3259dc0acbaabd9cc5.tar.gz
rockbox-facbaab1953f9ab355fb3a3259dc0acbaabd9cc5.tar.bz2
rockbox-facbaab1953f9ab355fb3a3259dc0acbaabd9cc5.zip
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
Diffstat (limited to 'firmware/target/hosted/sdl')
-rw-r--r--firmware/target/hosted/sdl/button-sdl.c7
1 files changed, 7 insertions, 0 deletions
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: