summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
487#define UI_LCD_POSX 35 487#define UI_LCD_POSX 35
488#define UI_LCD_POSY 36 488#define UI_LCD_POSY 36
489 489
490#elif defined(CREATIVE_ZENXFI)
491#define UI_TITLE "Creative ZEN X-Fi"
492#define UI_WIDTH 510 /* width of GUI window */
493#define UI_HEIGHT 330 /* height of GUI window */
494#define UI_LCD_POSX 32
495#define UI_LCD_POSY 33
496
490#elif defined(SIMULATOR) 497#elif defined(SIMULATOR)
491#error no UI defines 498#error no UI defines
492#endif 499#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)
46 new_btn = BUTTON_DOWN; 46 new_btn = BUTTON_DOWN;
47 break; 47 break;
48 case SDLK_KP9: 48 case SDLK_KP9:
49 new_btn = BUTTON_TOPRIGHT;
50 break;
49 case SDLK_PAGEUP: 51 case SDLK_PAGEUP:
50 new_btn = BUTTON_MENU; 52 new_btn = BUTTON_MENU;
51 break; 53 break;
52 case SDLK_KP1: 54 case SDLK_KP1:
55 new_btn = BUTTON_BOTTOMLEFT;
56 break;
53 case SDLK_END: 57 case SDLK_END:
54 new_btn = BUTTON_SHORTCUT; 58 new_btn = BUTTON_SHORTCUT;
55 break; 59 break;
56 case SDLK_KP3: 60 case SDLK_KP3:
61 new_btn = BUTTON_BOTTOMRIGHT;
62 break;
57 case SDLK_PAGEDOWN: 63 case SDLK_PAGEDOWN:
58 new_btn = BUTTON_PLAYPAUSE; 64 new_btn = BUTTON_PLAYPAUSE;
59 break; 65 break;
@@ -70,6 +76,8 @@ int key_to_button(int keyboard_button)
70 break; 76 break;
71#endif 77#endif
72 case SDLK_KP7: 78 case SDLK_KP7:
79 new_btn = BUTTON_TOPLEFT;
80 break;
73 case SDLK_HOME: 81 case SDLK_HOME:
74 case SDLK_BACKSPACE: 82 case SDLK_BACKSPACE:
75 new_btn = BUTTON_BACK; 83 new_btn = BUTTON_BACK;
@@ -97,6 +105,23 @@ struct button_map bm[] = {
97 { SDLK_PAGEDOWN, 462, 275, 20, "Play" }, 105 { SDLK_PAGEDOWN, 462, 275, 20, "Play" },
98 { 0, 0, 0, 0, "None" } 106 { 0, 0, 0, 0, "None" }
99}; 107};
108#elif defined(CREATIVE_ZENXFI)
109struct button_map bm[] = {
110 { SDLK_LEFT, 386, 166, 13, "Left" },
111 { SDLK_RIGHT, 466, 166, 13, "Right" },
112 { SDLK_UP, 426, 126, 13, "Up" },
113 { SDLK_DOWN, 426, 206, 13, "Down" },
114 { SDLK_RETURN, 426, 166, 13, "Select" },
115 { SDLK_KP7, 386, 126, 13, "Top Left" },
116 { SDLK_KP9, 466, 126, 13, "Top Right" },
117 { SDLK_KP3, 466, 166, 13, "Bottom Right" },
118 { SDLK_KP1, 386, 166, 13, "Bottom Left" },
119 { SDLK_HOME, 390, 63, 16, "Back" },
120 { SDLK_PAGEUP, 463, 63, 16, "Menu" },
121 { SDLK_END, 390, 267, 16, "Shortcut" },
122 { SDLK_PAGEDOWN, 463, 267, 16, "Play" },
123 { 0, 0, 0, 0, "None" }
124};
100#else 125#else
101#error please define button map 126#error please define button map
102#endif 127#endif