From a09606123f4e8501dd527c48d493853435df2a0d Mon Sep 17 00:00:00 2001 From: Szymon Dziok Date: Mon, 1 Feb 2010 16:41:03 +0000 Subject: Packard Bell Vibe 500: add the simulator git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24439 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/sdl/UI-vibe500.bmp | Bin 0 -> 421688 bytes uisimulator/sdl/button.c | 37 ++++++++++++++++++++++++++++++++++++- uisimulator/sdl/uisdl.h | 7 +++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 uisimulator/sdl/UI-vibe500.bmp (limited to 'uisimulator/sdl') diff --git a/uisimulator/sdl/UI-vibe500.bmp b/uisimulator/sdl/UI-vibe500.bmp new file mode 100644 index 0000000000..8c12aa5fff Binary files /dev/null and b/uisimulator/sdl/UI-vibe500.bmp differ diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index 0f9770dcac..a102925ed2 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c @@ -1248,7 +1248,42 @@ void button_event(int key, bool pressed) break; case SDLK_KP_MINUS: new_btn = BUTTON_VOL_DOWN; - break; + break; +#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD + case SDLK_KP4: + case SDLK_LEFT: + new_btn = BUTTON_PREV; + break; + case SDLK_KP6: + case SDLK_RIGHT: + new_btn = BUTTON_NEXT; + 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_KP7: + new_btn = BUTTON_MENU; + break; + case SDLK_KP9: + new_btn = BUTTON_PLAY; + break; + case SDLK_KP5: + new_btn = BUTTON_OK; + break; + case SDLK_KP_DIVIDE: + new_btn = BUTTON_CANCEL; + break; + case SDLK_KP_PLUS: + new_btn = BUTTON_POWER; + break; + case SDLK_KP_MULTIPLY: + new_btn = BUTTON_REC; + break; #else #error No keymap defined! #endif /* CONFIG_KEYPAD */ diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h index 5dfb9c5c2b..58a2f9959d 100644 --- a/uisimulator/sdl/uisdl.h +++ b/uisimulator/sdl/uisdl.h @@ -364,6 +364,13 @@ #define UI_HEIGHT 436 /* height of GUI window */ #define UI_LCD_POSX 148 /* x position of lcd */ #define UI_LCD_POSY 50 /* y position of lcd */ + +#elif defined(PBELL_VIBE500) +#define UI_TITLE "Packard Bell Vibe 500" +#define UI_WIDTH 287 /* width of GUI window */ +#define UI_HEIGHT 488 /* height of GUI window */ +#define UI_LCD_POSX 64 /* x position of lcd */ +#define UI_LCD_POSY 61 /* y position of lcd */ #else #error no UI defines #endif -- cgit v1.2.3