1
0
Fork 0
forked from len0rd/rockbox

Sansa Clip simulator

First draft at keymapping based on e200

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18948 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2008-10-31 18:54:37 +00:00
parent c5685ed72d
commit cd9b1379ff
10 changed files with 390 additions and 22 deletions

BIN
uisimulator/sdl/UI-clip.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

View file

@ -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 */

View file

@ -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 */