summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/sdl/UI-clip.bmpbin0 -> 266554 bytes
-rw-r--r--uisimulator/sdl/button.c30
-rw-r--r--uisimulator/sdl/uisdl.h13
3 files changed, 43 insertions, 0 deletions
diff --git a/uisimulator/sdl/UI-clip.bmp b/uisimulator/sdl/UI-clip.bmp
new file mode 100644
index 0000000000..597f3f9ede
--- /dev/null
+++ b/uisimulator/sdl/UI-clip.bmp
Binary files differ
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 2a06f2e435..9f86cd8ed0 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -950,6 +950,36 @@ void button_event(int key, bool pressed)
case SDLK_SPACE:
new_btn = BUTTON_SELECT;
break;
+
+#elif CONFIG_KEYPAD == SANSA_CLIP_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_UP;
+ break;
+ case SDLK_KP2:
+ case SDLK_DOWN:
+ new_btn = BUTTON_DOWN;
+ break;
+ case SDLK_INSERT:
+ new_btn = BUTTON_HOME;
+ break;
+ case SDLK_SPACE:
+ new_btn = BUTTON_SELECT;
+ break;
+ case SDLK_PAGEDOWN:
+ new_btn = BUTTON_VOL_DOWN;
+ break;
+ case SDLK_PAGEUP:
+ new_btn = BUTTON_VOL_UP;
+ break;
#else
#error No keymap defined!
#endif /* CONFIG_KEYPAD */
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h
index aeac51f7bf..03f5119ca8 100644
--- a/uisimulator/sdl/uisdl.h
+++ b/uisimulator/sdl/uisdl.h
@@ -436,6 +436,19 @@
#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_CLIP)
+#define UI_TITLE "Sansa Clip"
+#define UI_WIDTH 205 /* width of GUI window */
+#define UI_HEIGHT 325 /* height of GUI window */
+#define UI_LCD_POSX 38 /* x position of lcd */
+#define UI_LCD_POSY 38 /* y position of lcd */
+#define UI_LCD_WIDTH 128
+#define UI_LCD_HEIGHT 64
+#define UI_LCD_BGCOLOR 0, 0, 0 /* bkgnd color of LCD (no backlight) */
+#define UI_LCD_BGCOLORLIGHT 192, 192, 192 /* bkgnd color of LCD (backlight) */
+#define UI_LCD_FGCOLOR 13, 226, 229 /* foreground color of LCD (no backlight) */
+#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
+
#endif
extern SDL_Surface *gui_surface;
extern bool background; /* True if the background image is enabled */