diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2014-02-21 11:25:07 +0100 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2014-02-23 20:23:51 +0100 |
| commit | facbaab1953f9ab355fb3a3259dc0acbaabd9cc5 (patch) | |
| tree | c1fa92517f9eca705f66a1b88667aa41b3299fe3 /firmware | |
| parent | 77f19f75eb3661b3e3966da20effa2631ed380f1 (diff) | |
| download | rockbox-facbaab1953f9ab355fb3a3259dc0acbaabd9cc5.zip rockbox-facbaab1953f9ab355fb3a3259dc0acbaabd9cc5.tar.gz rockbox-facbaab1953f9ab355fb3a3259dc0acbaabd9cc5.tar.bz2 rockbox-facbaab1953f9ab355fb3a3259dc0acbaabd9cc5.tar.xz | |
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')
| -rw-r--r-- | firmware/export/config/sim.h | 3 | ||||
| -rw-r--r-- | firmware/target/hosted/sdl/button-sdl.c | 7 |
2 files changed, 7 insertions, 3 deletions
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: |