diff options
author | Szymon Dziok <b0hoon@o2.pl> | 2010-10-21 22:20:16 +0000 |
---|---|---|
committer | Szymon Dziok <b0hoon@o2.pl> | 2010-10-21 22:20:16 +0000 |
commit | c8dfe0508e176b87594f12a67467d51715f53a54 (patch) | |
tree | 2c5e8be6a0986cf29dc0f4628671a1abf7b2c0c0 | |
parent | 93ac9868670f3005813c7443988a612c8bab96e3 (diff) |
HDD6330: add the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28323 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/hosted/sdl/sim-ui-defines.h | 7 | ||||
-rw-r--r-- | uisimulator/bitmaps/UI-gogearhdd6330.bmp | bin | 0 -> 736854 bytes | |||
-rw-r--r-- | uisimulator/buttonmap/SOURCES | 2 | ||||
-rw-r--r-- | uisimulator/buttonmap/gogear-hdd6330.c | 79 |
4 files changed, 88 insertions, 0 deletions
diff --git a/firmware/target/hosted/sdl/sim-ui-defines.h b/firmware/target/hosted/sdl/sim-ui-defines.h index 926356dd9f..c44fea54b7 100644 --- a/firmware/target/hosted/sdl/sim-ui-defines.h +++ b/firmware/target/hosted/sdl/sim-ui-defines.h @@ -333,6 +333,13 @@ #define UI_LCD_POSX 143 /* x position of lcd */ #define UI_LCD_POSY 27 /* y position of lcd */ +#elif defined(PHILIPS_HDD6330) +#define UI_TITLE "Philips GoGear HDD63X0" +#define UI_WIDTH 400 /* width of GUI window */ +#define UI_HEIGHT 614 /* height of GUI window */ +#define UI_LCD_POSX 89 /* x position of lcd */ +#define UI_LCD_POSY 113 /* y position of lcd */ + #elif defined(SANSA_M200V4) #define UI_TITLE "sansa m200v4" #define UI_WIDTH 350 /* width of GUI window */ diff --git a/uisimulator/bitmaps/UI-gogearhdd6330.bmp b/uisimulator/bitmaps/UI-gogearhdd6330.bmp Binary files differnew file mode 100644 index 0000000000..92ea0a2166 --- /dev/null +++ b/uisimulator/bitmaps/UI-gogearhdd6330.bmp diff --git a/uisimulator/buttonmap/SOURCES b/uisimulator/buttonmap/SOURCES index 0fc9d16097..7ab80da5d3 100644 --- a/uisimulator/buttonmap/SOURCES +++ b/uisimulator/buttonmap/SOURCES @@ -51,6 +51,8 @@ meizu-m6sl.c gogear-sa9200.c #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD gogear-hdd1630.c +#elif CONFIG_KEYPAD == PHILIPS_HDD6330_PAD +gogear-hdd6330.c #elif CONFIG_KEYPAD == ONDAVX747_PAD onda-vx747.c #elif CONFIG_KEYPAD == ONDAVX777_PAD diff --git a/uisimulator/buttonmap/gogear-hdd6330.c b/uisimulator/buttonmap/gogear-hdd6330.c new file mode 100644 index 0000000000..ee3ad56971 --- /dev/null +++ b/uisimulator/buttonmap/gogear-hdd6330.c @@ -0,0 +1,79 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2010 Szymon Dziok + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + + +#include <SDL.h> +#include "button.h" +#include "buttonmap.h" + +int key_to_button(int keyboard_button) +{ + int new_btn = BUTTON_NONE; + switch (keyboard_button) + { + 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_KP5: + case SDLK_SPACE: + new_btn = BUTTON_PLAY; + break; + case SDLK_KP7: + new_btn = BUTTON_PREV; + break; + case SDLK_KP9: + new_btn = BUTTON_NEXT; + break; + case SDLK_KP1: + new_btn = BUTTON_MENU; + break; + case SDLK_KP3: + new_btn = BUTTON_VIEW; + break; + case SDLK_KP_MULTIPLY: + new_btn = BUTTON_POWER; + break; + case SDLK_KP_PLUS: + new_btn = BUTTON_VOL_UP; + break; + case SDLK_KP_MINUS: + new_btn = BUTTON_VOL_DOWN; + break; + } + return new_btn; +} + +struct button_map bm[] = { + { 0, 0, 0, 0, "None" } +}; |