summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-11-08 13:05:58 +0000
committerAmaury Pouly <amaury.pouly@gmail.com>2013-11-08 13:05:58 +0000
commit0c2ebbb2cf5abb4dfe9d43dcb23213a39fbc67ff (patch)
tree7a0ccfaf69cabbdd5835d4d654c9d2b7f6dc45f8
parentb1ee21d45e69600c169d9269ca09252ed2dc6708 (diff)
downloadrockbox-0c2ebbb.tar.gz
rockbox-0c2ebbb.tar.bz2
rockbox-0c2ebbb.zip
zenxfi: add simulator keymap and bitmap
Change-Id: Ic82ad39234d3056c3cc06d9f8f0ba6f28892e15f
-rw-r--r--firmware/target/hosted/sdl/sim-ui-defines.h7
-rw-r--r--uisimulator/bitmaps/UI-creativezenxfi.bmpbin0 -> 505614 bytes
-rw-r--r--uisimulator/buttonmap/creative-zen.c25
3 files changed, 32 insertions, 0 deletions
diff --git a/firmware/target/hosted/sdl/sim-ui-defines.h b/firmware/target/hosted/sdl/sim-ui-defines.h
index 7289329d21..f3ef41edb4 100644
--- a/firmware/target/hosted/sdl/sim-ui-defines.h
+++ b/firmware/target/hosted/sdl/sim-ui-defines.h
@@ -487,6 +487,13 @@
#define UI_LCD_POSX 35
#define UI_LCD_POSY 36
+#elif defined(CREATIVE_ZENXFI)
+#define UI_TITLE "Creative ZEN X-Fi"
+#define UI_WIDTH 510 /* width of GUI window */
+#define UI_HEIGHT 330 /* height of GUI window */
+#define UI_LCD_POSX 32
+#define UI_LCD_POSY 33
+
#elif defined(SIMULATOR)
#error no UI defines
#endif
diff --git a/uisimulator/bitmaps/UI-creativezenxfi.bmp b/uisimulator/bitmaps/UI-creativezenxfi.bmp
new file mode 100644
index 0000000000..003378e946
--- /dev/null
+++ b/uisimulator/bitmaps/UI-creativezenxfi.bmp
Binary files differ
diff --git a/uisimulator/buttonmap/creative-zen.c b/uisimulator/buttonmap/creative-zen.c
index f19df4eb6a..275de5616f 100644
--- a/uisimulator/buttonmap/creative-zen.c
+++ b/uisimulator/buttonmap/creative-zen.c
@@ -46,14 +46,20 @@ int key_to_button(int keyboard_button)
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;
@@ -70,6 +76,8 @@ int key_to_button(int keyboard_button)
break;
#endif
case SDLK_KP7:
+ new_btn = BUTTON_TOPLEFT;
+ break;
case SDLK_HOME:
case SDLK_BACKSPACE:
new_btn = BUTTON_BACK;
@@ -97,6 +105,23 @@ struct button_map bm[] = {
{ SDLK_PAGEDOWN, 462, 275, 20, "Play" },
{ 0, 0, 0, 0, "None" }
};
+#elif defined(CREATIVE_ZENXFI)
+struct button_map bm[] = {
+ { SDLK_LEFT, 386, 166, 13, "Left" },
+ { SDLK_RIGHT, 466, 166, 13, "Right" },
+ { SDLK_UP, 426, 126, 13, "Up" },
+ { SDLK_DOWN, 426, 206, 13, "Down" },
+ { SDLK_RETURN, 426, 166, 13, "Select" },
+ { SDLK_KP7, 386, 126, 13, "Top Left" },
+ { SDLK_KP9, 466, 126, 13, "Top Right" },
+ { SDLK_KP3, 466, 166, 13, "Bottom Right" },
+ { SDLK_KP1, 386, 166, 13, "Bottom Left" },
+ { SDLK_HOME, 390, 63, 16, "Back" },
+ { SDLK_PAGEUP, 463, 63, 16, "Menu" },
+ { SDLK_END, 390, 267, 16, "Shortcut" },
+ { SDLK_PAGEDOWN, 463, 267, 16, "Play" },
+ { 0, 0, 0, 0, "None" }
+};
#else
#error please define button map
#endif