summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-11-08 13:57:21 +0000
committerAmaury Pouly <amaury.pouly@gmail.com>2013-11-08 13:57:21 +0000
commit6979a5b63c184ce0ec0daa392edacde184d40d29 (patch)
treef87023dec06490a9c8b2031e3d1c5385a609a6c3
parent0c2ebbb2cf5abb4dfe9d43dcb23213a39fbc67ff (diff)
downloadrockbox-6979a5b.tar.gz
rockbox-6979a5b.tar.bz2
rockbox-6979a5b.zip
zenmozaic: add keymap and bitmap for simulator
Change-Id: I1be76d5b82ef585d2146d12aacad456071341827
-rw-r--r--firmware/target/hosted/sdl/sim-ui-defines.h7
-rw-r--r--uisimulator/bitmaps/UI-creativezenmozaic.bmpbin0 -> 202086 bytes
-rw-r--r--uisimulator/buttonmap/creative-zen.c37
3 files changed, 29 insertions, 15 deletions
diff --git a/firmware/target/hosted/sdl/sim-ui-defines.h b/firmware/target/hosted/sdl/sim-ui-defines.h
index f3ef41edb4..f65e1b7da7 100644
--- a/firmware/target/hosted/sdl/sim-ui-defines.h
+++ b/firmware/target/hosted/sdl/sim-ui-defines.h
@@ -494,6 +494,13 @@
#define UI_LCD_POSX 32
#define UI_LCD_POSY 33
+#elif defined(CREATIVE_ZENMOZAIC)
+#define UI_TITLE "Creative ZEN Mozaic"
+#define UI_WIDTH 184 /* width of GUI window */
+#define UI_HEIGHT 366/* height of GUI window */
+#define UI_LCD_POSX 27
+#define UI_LCD_POSY 48
+
#elif defined(SIMULATOR)
#error no UI defines
#endif
diff --git a/uisimulator/bitmaps/UI-creativezenmozaic.bmp b/uisimulator/bitmaps/UI-creativezenmozaic.bmp
new file mode 100644
index 0000000000..bcb693abd1
--- /dev/null
+++ b/uisimulator/bitmaps/UI-creativezenmozaic.bmp
Binary files differ
diff --git a/uisimulator/buttonmap/creative-zen.c b/uisimulator/buttonmap/creative-zen.c
index 275de5616f..e8f07b4e94 100644
--- a/uisimulator/buttonmap/creative-zen.c
+++ b/uisimulator/buttonmap/creative-zen.c
@@ -45,21 +45,12 @@ int key_to_button(int keyboard_button)
case SDLK_DOWN:
new_btn = BUTTON_DOWN;
break;
- case SDLK_KP9:
- new_btn = BUTTON_TOPRIGHT;
- break;
case SDLK_PAGEUP:
new_btn = BUTTON_MENU;
break;
- case SDLK_KP1:
- new_btn = BUTTON_BOTTOMLEFT;
- break;
case SDLK_END:
new_btn = BUTTON_SHORTCUT;
break;
- case SDLK_KP3:
- new_btn = BUTTON_BOTTOMRIGHT;
- break;
case SDLK_PAGEDOWN:
new_btn = BUTTON_PLAYPAUSE;
break;
@@ -67,17 +58,20 @@ int key_to_button(int keyboard_button)
case SDLK_DELETE:
new_btn = BUTTON_POWER;
break;
-#ifdef CREATIVE_ZENMOZAIC
- case SDLK_KP_PLUS:
- new_btn = BUTTON_VOL_UP;
+#ifdef CREATIVE_ZENXFI
+ case SDLK_KP1:
+ new_btn = BUTTON_BOTTOMLEFT;
break;
- case SDLK_KP_MINUS:
- new_btn = BUTTON_VOL_DOWN;
+ case SDLK_KP3:
+ new_btn = BUTTON_BOTTOMRIGHT;
break;
-#endif
case SDLK_KP7:
new_btn = BUTTON_TOPLEFT;
break;
+ case SDLK_KP9:
+ new_btn = BUTTON_TOPRIGHT;
+ break;
+#endif
case SDLK_HOME:
case SDLK_BACKSPACE:
new_btn = BUTTON_BACK;
@@ -122,6 +116,19 @@ struct button_map bm[] = {
{ SDLK_PAGEDOWN, 463, 267, 16, "Play" },
{ 0, 0, 0, 0, "None" }
};
+#elif defined(CREATIVE_ZENMOZAIC)
+struct button_map bm[] = {
+ { SDLK_LEFT, 37, 281, 15, "Left" },
+ { SDLK_RIGHT, 101, 281, 15, "Right" },
+ { SDLK_UP, 69, 249, 15, "Up" },
+ { SDLK_DOWN, 69, 313, 15, "Down" },
+ { SDLK_RETURN, 69, 281, 15, "Select" },
+ { SDLK_HOME, 37, 249, 15, "Back" },
+ { SDLK_PAGEUP, 101, 249, 15, "Menu" },
+ { SDLK_END, 37, 313, 15, "Shortcut" },
+ { SDLK_PAGEDOWN, 101, 313, 15, "Play" },
+ { 0, 0, 0, 0, "None" }
+};
#else
#error please define button map
#endif