summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-11-11 11:26:07 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-11-11 11:26:07 +0000
commit0d812dd235861d83da25df885414b2d92b6435a5 (patch)
tree98710c36061c5f94be5df92fe40c510253f1a5f7 /uisimulator
parentce505b8a01d3fcebeab5bcced0688d62eae1083e (diff)
downloadrockbox-0d812dd235861d83da25df885414b2d92b6435a5.tar.gz
rockbox-0d812dd235861d83da25df885414b2d92b6435a5.tar.bz2
rockbox-0d812dd235861d83da25df885414b2d92b6435a5.zip
FS#9535 - Sansa Fuze sim
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19086 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/sdl/UI-fuze.bmpbin0 -> 501138 bytes
-rw-r--r--uisimulator/sdl/button.c38
-rw-r--r--uisimulator/sdl/uisdl.h10
3 files changed, 47 insertions, 1 deletions
diff --git a/uisimulator/sdl/UI-fuze.bmp b/uisimulator/sdl/UI-fuze.bmp
new file mode 100644
index 0000000000..02b07b61ba
--- /dev/null
+++ b/uisimulator/sdl/UI-fuze.bmp
Binary files differ
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 840a599aac..614308a070 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -950,7 +950,43 @@ void button_event(int key, bool pressed)
case SDLK_SPACE:
new_btn = BUTTON_SELECT;
break;
-
+#elif CONFIG_KEYPAD == SANSA_FUZE_PAD
+ case SDLK_KP4:
+ case SDLK_LEFT:
+ new_btn = BUTTON_LEFT;
+ break;
+ case SDLK_KP6:
+ case SDLK_RIGHT:
+ new_btn = BUTTON_RIGHT;
+ break;
+ case SDLK_KP8:
+ case SDLK_UP:
+ new_btn = BUTTON_SCROLL_BACK;
+ break;
+ case SDLK_KP2:
+ case SDLK_DOWN:
+ new_btn = BUTTON_SCROLL_FWD;
+ break;
+ case SDLK_PAGEUP:
+ case SDLK_KP9:
+ new_btn = BUTTON_UP;
+ break;
+ case SDLK_PAGEDOWN:
+ case SDLK_KP3:
+ new_btn = BUTTON_DOWN;
+ break;
+ case SDLK_KP_MINUS:
+ new_btn = BUTTON_POWER;
+ break;
+ case SDLK_KP_MULTIPLY:
+ new_btn = BUTTON_HOME;
+ break;
+ case SDLK_KP5:
+ case SDLK_SPACE:
+ case SDLK_KP_ENTER:
+ case SDLK_RETURN:
+ new_btn = BUTTON_SELECT;
+ break;
#elif CONFIG_KEYPAD == SANSA_CLIP_PAD
case SDLK_KP4:
case SDLK_LEFT:
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h
index 4332426963..5b0f944d3f 100644
--- a/uisimulator/sdl/uisdl.h
+++ b/uisimulator/sdl/uisdl.h
@@ -436,6 +436,16 @@
#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
+#elif defined(SANSA_FUZE)
+#define UI_TITLE "Sansa Fuze"
+#define UI_WIDTH 279 /* width of GUI window */
+#define UI_HEIGHT 449 /* height of GUI window */
+/* high-colour */
+#define UI_LCD_POSX 30 /* x position of lcd */
+#define UI_LCD_POSY 31 /* y position of lcd */
+#define UI_LCD_WIDTH LCD_WIDTH
+#define UI_LCD_HEIGHT LCD_HEIGHT
+
#elif defined(SANSA_CLIP)
#define UI_TITLE "Sansa Clip"
#define UI_WIDTH 205 /* width of GUI window */